Opened 14 years ago
Closed 14 years ago
#15314 closed (fixed)
Kwargs need to be passed as a non-positional argument in django.conf.urls.static
Reported by: | Bruno Renié | Owned by: | Jannis Leidel |
---|---|---|---|
Component: | contrib.staticfiles | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The new django.conf.urls.static helper added in r15530 is not usable as stated in the docs:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
gives a TypeError, url() got an unexpected keyword argument 'document_root'
.
This is because the url() function needs kwargs
instead of **kwargs
.
Attachments (1)
Change History (4)
by , 14 years ago
Attachment: | 15314-static.diff added |
---|
comment:1 by , 14 years ago
Has patch: | set |
---|
comment:2 by , 14 years ago
Component: | Uncategorized → django.contrib.staticfiles |
---|---|
Owner: | changed from | to
Triage Stage: | Unreviewed → Ready for checkin |
comment:3 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
In [15552]: