Code

Opened 7 years ago

Closed 4 years ago

#5742 closed (wontfix)

`static_pattern` shortcut for serving static files

Reported by: SmileyChris Owned by: SmileyChris
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 SmileyChris 7 years ago.
static_patterns.2.patch (3.3 KB) - added by SmileyChris 7 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 SmileyChris 7 years ago.
Missed another reference to static_patterns
static_patterns.diff (3.4 KB) - added by SmileyChris 6 years ago.
Ability to test against any setting, not just DEBUG

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by SmileyChris

Changed 7 years ago by SmileyChris

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

Changed 7 years ago by SmileyChris

Missed another reference to static_patterns

comment:1 Changed 7 years ago by Simon Willison

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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

  • Triage Stage changed from Unreviewed to Design decision needed

comment:3 Changed 6 years ago by anonymous

  • Summary changed from `static_patterns` shortcut for serving static files to `static_pattern` shortcut for serving static files

comment:4 Changed 6 years ago by SmileyChris

  • Owner changed from nobody to SmileyChris

Changed 6 years ago by SmileyChris

Ability to test against any setting, not just DEBUG

comment:5 Changed 6 years ago by SmileyChris

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 4 years ago by mtredinnick

  • Resolution set to wontfix
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.