Opened 3 years ago

Closed 2 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

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 Changed 3 years ago by akaariai

  • Component changed from Uncategorized to contrib.staticfiles
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Cleanup/optimization

comment:2 Changed 2 years ago by fakotb

  • Owner changed from nobody to fakotb
  • Status changed from new to assigned

comment:3 Changed 2 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: https://github.com/django/django/pull/758

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

  • Resolution set to fixed
  • Status changed from assigned to closed

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