From 6c5da14dc446eaf376cabaa98dd15c2d4fed6a56 Mon Sep 17 00:00:00 2001 From: Sanj Date: Sat, 11 Aug 2012 14:52:04 +0530 Subject: [PATCH] updated requirements to Django 1.4 --- chaloBEST/mumbai/admin.py | 2 +- chaloBEST/settings.py | 10 +++++++--- chaloBEST/urls.py | 3 ++- requirements.txt | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/chaloBEST/mumbai/admin.py b/chaloBEST/mumbai/admin.py index 067035b..7fb05ba 100644 --- a/chaloBEST/mumbai/admin.py +++ b/chaloBEST/mumbai/admin.py @@ -2,7 +2,7 @@ from django.contrib.gis import admin from django import forms from mumbai.models import * from django.contrib.contenttypes import generic -from django.contrib.admin.filterspecs import FilterSpec, RelatedFilterSpec +#from django.contrib.admin.filterspecs import FilterSpec, RelatedFilterSpec ''' class CustomFilterSpec(RelatedFilterSpec): diff --git a/chaloBEST/settings.py b/chaloBEST/settings.py index ad7bc6e..67b6364 100644 --- a/chaloBEST/settings.py +++ b/chaloBEST/settings.py @@ -54,17 +54,20 @@ USE_L10N = True # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = join(PROJECT_ROOT, 'static') +MEDIA_ROOT = join(PROJECT_ROOT, '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 = '' +MEDIA_URL = '/media/' + +STATIC_URL = '/static/' +STATIC_ROOT = join(PROJECT_ROOT, '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 = '/admin/media/' +#ADMIN_MEDIA_PREFIX = '/admin/media/' # Make this unique, and don't share it with anybody. try: @@ -116,6 +119,7 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', + 'django.contrib.staticfiles', # Uncomment the next line to enable the admin: 'django.contrib.admin', # Uncomment the next line to enable admin documentation: diff --git a/chaloBEST/urls.py b/chaloBEST/urls.py index bc620fb..a4e43a7 100644 --- a/chaloBEST/urls.py +++ b/chaloBEST/urls.py @@ -14,7 +14,7 @@ urlpatterns = patterns('', # (r'^chaloBEST/', include('chaloBEST.foo.urls')), url(r'^$','chaloBEST.views.index', name='index'), url(r'^stats/$','mumbai.views.stats', name='stats'), - url(r'^static/(?P.*)$','django.views.static.serve', {'document_root':'./static'}), +# url(r'^static/(?P.*)$','django.views.static.serve', {'document_root':'./static'}), (r'^routes/$', 'mumbai.views.routes'), (r'^route/(?P[a-zA-Z0-9\s\-]*?)/$', 'mumbai.views.route'), (r'^route/(?P[a-zA-Z0-9\s\-]*?)/georss/$', RouteFeed()), @@ -43,6 +43,7 @@ if settings.LOCAL_DEVELOPMENT: urlpatterns += patterns('', # (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': join(settings.PROJECT_ROOT, "static")}), + (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': join(settings.PROJECT_ROOT, "media")}), # ) diff --git a/requirements.txt b/requirements.txt index f049daf..946c686 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -Django==1.3 +Django==1.4.1 RapidSMS==0.9.6a -e git://github.com/schuyler/arrest.git@0017837a45bcb31786f953fba976d454ae684ecc#egg=arrest-dev chardet==1.0.1