diff options
| author | Tim Graham <timograham@gmail.com> | 2014-04-01 20:46:34 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-04-03 07:28:10 -0400 |
| commit | d73d0e071c1b4c86d57994a0ab55a74cfe80cdf5 (patch) | |
| tree | f36eebaf1cdd8bd07503b3a538e7d875ff8d29b4 /docs/howto/static-files | |
| parent | e6ced2bb086396b57601d04ad5b3ba347d1eb785 (diff) | |
Fixed #22218 -- Deprecated django.conf.urls.patterns.
Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews.
Diffstat (limited to 'docs/howto/static-files')
| -rw-r--r-- | docs/howto/static-files/index.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/howto/static-files/index.txt b/docs/howto/static-files/index.txt index f94e2601e4..39e5cf1b94 100644 --- a/docs/howto/static-files/index.txt +++ b/docs/howto/static-files/index.txt @@ -94,9 +94,9 @@ this by adding the following snippet to your urls.py:: from django.conf import settings from django.conf.urls.static import static - urlpatterns = patterns('', + urlpatterns = [ # ... the rest of your URLconf goes here ... - ) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) .. note:: @@ -124,9 +124,9 @@ this by adding the following snippet to your urls.py:: from django.conf import settings from django.conf.urls.static import static - urlpatterns = patterns('', + urlpatterns = [ # ... the rest of your URLconf goes here ... - ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) .. note:: |
