From 3b356bf9170317181313e2aa7e622490f69d61fe Mon Sep 17 00:00:00 2001 From: luxagraf Date: Mon, 15 Oct 2012 15:57:47 +0000 Subject: changed settings for remote server --- config/base_urls.py | 16 +++++++++------- config/settings/settings.py | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'config') diff --git a/config/base_urls.py b/config/base_urls.py index b2cd642..201a621 100644 --- a/config/base_urls.py +++ b/config/base_urls.py @@ -24,14 +24,10 @@ feeds = { 'fblinks' : LatestLinks, } -if settings.DEVELOPMENT: - urlpatterns = patterns('', +urlpatterns = patterns('', (r'^media/admin/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT+'/admin'}), - (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), - (r'^images/(?P.*)$', 'django.views.static.serve', {'document_root': settings.IMAGES_ROOT}), - ) -else: - urlpatterns = patterns('') + (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), +) # old page redirects urlpatterns += patterns('', @@ -70,3 +66,9 @@ urlpatterns += patterns('', (r'^(?P[-\w]+)/$', 'pages.views.page'), ) + +urlpatterns += patterns('', + url(r'^static/(?P.*)$', 'django.views.static.serve', + {'document_root': settings.STATIC_ROOT,} + ), +) diff --git a/config/settings/settings.py b/config/settings/settings.py index 246b1be..850e232 100644 --- a/config/settings/settings.py +++ b/config/settings/settings.py @@ -56,7 +56,7 @@ MEDIA_ROOT = os.path.join(PROJ_ROOT, 'site/media') # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash. # Examples: "http://media.lawrence.com/media/", "http://example.com/media/" -MEDIA_URL = 'http://luxagraf.net/media/' +MEDIA_URL = 'http://live.luxagraf.net/media/' # Absolute path to the directory static files should be collected to. # Don't put anything in this directory yourself; store your static files -- cgit v1.2.3-70-g09d2