From ad4118be443266685cfc7ab2d59794e0692bc944 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Tue, 15 Mar 2011 20:13:21 +0000 Subject: Fixed #15598 -- Updated static URL helper to be no-op on non-local prefixes. Thanks, traff. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15839 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/howto/static-files.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs') diff --git a/docs/howto/static-files.txt b/docs/howto/static-files.txt index 2787c1cac8..77e07141e3 100644 --- a/docs/howto/static-files.txt +++ b/docs/howto/static-files.txt @@ -297,6 +297,12 @@ development:: # ... the rest of your URLconf goes here ... ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) +.. note:: + + The helper function will only be operational in debug mode and if + the given prefix is local (e.g. ``/static/``) and not a URL (e.g. + ``http://static.example.com/``). + .. _staticfiles-production: Serving static files in production -- cgit v1.3