Opened 19 years ago

Closed 16 years ago

#5742 closed (wontfix)

`static_pattern` shortcut for serving static files

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

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 19 years ago.
static_patterns.2.patch​ (3.3 KB ) - added by Chris Beaven 19 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 19 years ago.
Missed another reference to static_patterns
static_patterns.diff​ (3.4 KB ) - added by Chris Beaven 19 years ago.
Ability to test against any setting, not just DEBUG

Download all attachments as: .zip

Change History (10)

by Chris Beaven, 19 years ago

Attachment: static_patterns.patch​ added

by Chris Beaven, 19 years ago

Attachment: static_patterns.2.patch​ added

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

by Chris Beaven, 19 years ago

Attachment: static_patterns.3.patch​ added

Missed another reference to static_patterns

comment:1 by Simon Willison, 19 years ago

comment:2 by Simon G <dev@…>, 19 years ago

Triage Stage: Unreviewed → Design decision needed

comment:3 by anonymous, 19 years ago

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

comment:4 by Chris Beaven, 19 years ago

Owner: changed from nobody to Chris Beaven

by Chris Beaven, 19 years ago

Attachment: static_patterns.diff​ added

Ability to test against any setting, not just DEBUG

comment:5 by Chris Beaven, 19 years ago

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 by Malcolm Tredinnick, 16 years ago

Resolution: → wontfix
Status: new → closed

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