Opened 12 years ago

Closed 12 years ago

#19572 closed Cleanup/optimization (fixed)

Unused argument in staticfiles.views.serve

Reported by: ostcar Owned by: fakotb
Component: contrib.staticfiles Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The view 'django.contrib.staticfiles.views.serve' has the optional argument 'document_root'. I guest that this argument can be used to serve files from another path. But the argument is not used in this function, so it does not serve other files in Django 1.4 or the development version.

You could either delete the argument, or merge this pull request: https://github.com/django/django/pull/621

Change History (4)

comment:1 by Anssi Kääriäinen, 12 years ago

Component: Uncategorizedcontrib.staticfiles
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

comment:2 by fakotb, 12 years ago

Owner: changed from nobody to fakotb
Status: newassigned

comment:3 by fakotb, 12 years ago

document_root argument in django.contrib.staticfiles.views.serve can be removed, because it is not used and it doesn't make sense to supply it as an option, since the way that this view finds static files is not based on dir structure (correct me if I'm wrong).

Pull request: https://github.com/django/django/pull/758

comment:4 by Jannis Leidel <jannis@…>, 12 years ago

Resolution: fixed
Status: assignedclosed

In bb2705d3dbe8f3a8dbabc89030edf1d6d6af9818:

Merge pull request #758 from FakoTB/master

Fixed #19572 - Remove document_root argument from staticfiles views.

Note: See TracTickets for help on using tickets.
Back to Top