Browse files

Removes document_root argument from django.contrib.staticfiles.views.…


This argument can be removed, because the new way of finding static files doesn't take document_root into account at all.
  • Loading branch information...
1 parent c12891e commit 2db9cbe97c3f375e1db6759db73cf15d09341420 fako committed Feb 23, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/contrib/staticfiles/
@@ -17,7 +17,7 @@
from django.contrib.staticfiles import finders
-def serve(request, path, document_root=None, insecure=False, **kwargs):
+def serve(request, path insecure=False, **kwargs):
Serve static files below a given point in the directory structure or
from locations inferred from the staticfiles finders.

1 comment on commit 2db9cbe

By doing this you seem to be preventing the use of alternate document roots.

In particular you prevent uses like this

        url(r'^Ext/(?P<path>.*)$', static_view,
            {"document_root": path.join(settings.PROJECT_ROOT, "Ext"),}),

Because now you can end up passing document_root twice to static.serve

serve() got multiple values for keyword argument 'document_root'

Please sign in to comment.