Fix configuration of the STATIC_URL in siteconfig.

Review Request #4080 — Created April 26, 2013 and submitted

Information

Djblets
master

Reviewers

Fix configuration of the STATIC_URL in siteconfig.

Our siteconfig code was properly turning the site_static_url setting
into settings.STATIC_URL, but it's too late at this point. Django has
already created the StaticFilesStorage and populated it with the default
settings.STATIC_URL.

Fortunately, this all happens before that URL is ever used (since this
is before any templates are rendered). So we can just grab the
staticfiles_storage instance and replace the URL.
Set the URL to /foo/ in siteconfig here and then loaded a page. Saw that
all the static media links were based on /foo/ (and of course now broken).

Before this, they were /static/, no matter what that value was.
Description From Last Updated

Col: 23 E241 multiple spaces after '

reviewbotreviewbot

Col: 37 E201 whitespace after '{'

reviewbotreviewbot

Col: 63 E202 whitespace before '}'

reviewbotreviewbot
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        djblets/siteconfig/django_settings.py
      Ignored Files:
    
    
  2. djblets/siteconfig/django_settings.py (Diff revision 1)
     
     
    Show all issues
    Col: 23
     E241 multiple spaces after '
  3. djblets/siteconfig/django_settings.py (Diff revision 1)
     
     
    Show all issues
    Col: 37
     E201 whitespace after '{'
    
  4. djblets/siteconfig/django_settings.py (Diff revision 1)
     
     
    Show all issues
    Col: 63
     E202 whitespace before '}'
    
  5. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to master (5d4d020)