Switch to using staticfiles contrib, update to Django 1.3
|
Before Width: | Height: | Size: 73 B After Width: | Height: | Size: 73 B |
|
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 434 B |
|
Before Width: | Height: | Size: 76 B After Width: | Height: | Size: 76 B |
|
Before Width: | Height: | Size: 435 B After Width: | Height: | Size: 435 B |
|
Before Width: | Height: | Size: 78 B After Width: | Height: | Size: 78 B |
|
Before Width: | Height: | Size: 440 B After Width: | Height: | Size: 440 B |
|
Before Width: | Height: | Size: 80 B After Width: | Height: | Size: 80 B |
|
Before Width: | Height: | Size: 442 B After Width: | Height: | Size: 442 B |
|
Before Width: | Height: | Size: 84 B After Width: | Height: | Size: 84 B |
|
Before Width: | Height: | Size: 444 B After Width: | Height: | Size: 444 B |
|
Before Width: | Height: | Size: 84 B After Width: | Height: | Size: 84 B |
@@ -37,28 +37,18 @@ SITE_ID = 1
|
||||
# to load the internationalization machinery.
|
||||
USE_I18N = True
|
||||
|
||||
# Absolute path to the directory that holds media.
|
||||
# Example: "/home/media/media.lawrence.com/"
|
||||
MEDIA_ROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'media')
|
||||
|
||||
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
||||
# trailing slash if there is a path component (optional in other cases).
|
||||
# Examples: "http://media.lawrence.com", "http://example.com/media/"
|
||||
MEDIA_URL = '/static/'
|
||||
|
||||
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
|
||||
# trailing slash.
|
||||
# Examples: "http://foo.com/media/", "/media/".
|
||||
ADMIN_MEDIA_PREFIX = '/media/'
|
||||
# Defines the Static Media storage as per staticfiles contrib
|
||||
STATIC_ROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'static')
|
||||
STATIC_URL = '/static/'
|
||||
ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'
|
||||
|
||||
# Make this unique, and don't share it with anybody.
|
||||
SECRET_KEY = '8i2+dd-b2tg9g%mq$&i$-8beh4i5^2mm=e-nh^$p47^w=z1igr'
|
||||
|
||||
# List of callables that know how to import templates from various sources.
|
||||
TEMPLATE_LOADERS = (
|
||||
'django.template.loaders.filesystem.load_template_source',
|
||||
'django.template.loaders.app_directories.load_template_source',
|
||||
# 'django.template.loaders.eggs.load_template_source',
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
@@ -97,6 +87,7 @@ INSTALLED_APPS = (
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.sites',
|
||||
'django.contrib.humanize',
|
||||
'django.contrib.staticfiles',
|
||||
'south',
|
||||
'piston',
|
||||
'djcelery',
|
||||
|
||||
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 673 B |
@@ -1,10 +1,10 @@
|
||||
from django.conf.urls.defaults import *
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth.views import login
|
||||
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||||
from django.conf import settings
|
||||
|
||||
from utils import installed
|
||||
|
||||
from registration.views import register
|
||||
from sso.forms import RegistrationFormUniqueEmailBlocked
|
||||
|
||||
@@ -18,7 +18,6 @@ urlpatterns = patterns('',
|
||||
(r'^eve/', include('eve_api.urls')),
|
||||
(r'^eveapi/', include('eve_proxy.urls')),
|
||||
(r'^api/', include('api.urls')),
|
||||
(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
|
||||
)
|
||||
|
||||
if installed('reddit'):
|
||||
@@ -36,3 +35,5 @@ if installed('groups'):
|
||||
(r'^groups/', include('groups.urls')),
|
||||
)
|
||||
|
||||
if settings.DEBUG:
|
||||
urlpatterns += staticfiles_urlpatterns()
|
||||
|
||||