Opened 9 years ago

Closed 6 years ago

#5742 closed (wontfix)

`static_pattern` shortcut for serving static files

Reported by: Chris Beaven Owned by: Chris Beaven
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

It seems like it could be useful to provide a reliable shortcut for adding static files to the urlpatterns of your URLconf.

The attached patch makes it even easier to serve static files from the most common use-case of MEDIA_ROOT and MEDIA_URL.

Attachments (4)

static_patterns.patch (3.3 KB) - added by Chris Beaven 9 years ago.
static_patterns.2.patch (3.3 KB) - added by Chris Beaven 9 years ago.
Changing the doc title to reflect the fact it's static_pattern, not static_patterns
static_patterns.3.patch (3.3 KB) - added by Chris Beaven 9 years ago.
Missed another reference to static_patterns
static_patterns.diff (3.4 KB) - added by Chris Beaven 9 years ago.
Ability to test against any setting, not just DEBUG

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by Chris Beaven

Attachment: static_patterns.patch added

Changed 9 years ago by Chris Beaven

Attachment: static_patterns.2.patch added

Changing the doc title to reflect the fact it's static_pattern, not static_patterns

Changed 9 years ago by Chris Beaven

Attachment: static_patterns.3.patch added

Missed another reference to static_patterns

comment:1 Changed 9 years ago by Simon Willison

comment:2 Changed 9 years ago by Simon G <dev@…>

Triage Stage: UnreviewedDesign decision needed

comment:3 Changed 9 years ago by anonymous

Summary: `static_patterns` shortcut for serving static files`static_pattern` shortcut for serving static files

comment:4 Changed 9 years ago by Chris Beaven

Owner: changed from nobody to Chris Beaven

Changed 9 years ago by Chris Beaven

Attachment: static_patterns.diff added

Ability to test against any setting, not just DEBUG

comment:5 Changed 9 years ago by Chris Beaven

Latest version makes it easy to test against any setting rather than just DEBUG (I've seen an example using a LOCAL_DEVELOPMENT setting)

comment:6 Changed 6 years ago by Malcolm Tredinnick

Resolution: wontfix
Status: newclosed

Not going to take this. We might add a commented out pattern for using the static server to the default project.

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