Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[bug 740431] Add STATIC_URL to settings and collecstatic to deploy sc…

…ript.

* Leaving ADMIN_MEDIA_PREFIX until we have /static/ set up on prod.
* Add `static` to .gitignore.
  • Loading branch information...
commit 1bcb4b6a0a4bb0ec487144f46c6deb34d9640ba6 1 parent 42a43d1
ricky rosario authored

Showing 3 changed files with 7 additions and 3 deletions. Show diff stats Hide diff stats

  1. +1 0  .gitignore
  2. +1 0  scripts/update/deploy.py
  3. +5 3 settings.py
1  .gitignore
@@ -14,3 +14,4 @@ tmp
14 14 locale
15 15 docs/_build
16 16 highstock.src.js
  17 +static
1  scripts/update/deploy.py
@@ -34,6 +34,7 @@ def update_locales(ctx):
34 34 @task
35 35 def update_assets(ctx):
36 36 with ctx.lcd(settings.SRC_DIR):
  37 + ctx.local("python2.6 manage.py collectstatic --noinput")
37 38 ctx.local("python2.6 manage.py cron get_highcharts")
38 39 ctx.local("LANG=en_US.UTF-8 python2.6 manage.py compress_assets")
39 40
8 settings.py
@@ -132,11 +132,12 @@
132 132 # Examples: "http://media.lawrence.com", "http://example.com/media/"
133 133 MEDIA_URL = '/media/'
134 134
135   -# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
136   -# trailing slash.
137   -# Examples: "http://foo.com/media/", "/media/".
  135 +# TODO: Remove this when we upgrade to django 1.4
138 136 ADMIN_MEDIA_PREFIX = '/admin-media/'
139 137
  138 +STATIC_ROOT = path('static')
  139 +STATIC_URL = '/static/'
  140 +
140 141 # Paths that don't require a locale prefix.
141 142 SUPPORTED_NONLOCALES = ('media', 'admin', 'robots.txt', 'services', '1',
142 143 'postcrash', 'wafflejs', 'favicon.ico')
@@ -240,6 +241,7 @@
240 241 'django.contrib.sessions',
241 242 'django.contrib.sites',
242 243 'django.contrib.messages',
  244 + 'django.contrib.staticfiles',
243 245 'django.contrib.admin',
244 246 'users',
245 247 'tower',

0 comments on commit 1bcb4b6

Please sign in to comment.
Something went wrong with that request. Please try again.