Opened 6 years ago

Closed 6 years ago

#19572 closed Cleanup/optimization (fixed)

Unused argument in staticfiles.views.serve

Reported by: ostcar Owned by: fakotb
Component: contrib.staticfiles Version: master
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


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:

Change History (4)

comment:1 Changed 6 years ago by Anssi Kääriäinen

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

comment:2 Changed 6 years ago by fakotb

Owner: changed from nobody to fakotb
Status: newassigned

comment:3 Changed 6 years ago by fakotb

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:

comment:4 Changed 6 years ago by Jannis Leidel <jannis@…>

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