Reorganized settings file to use the current filesystem path than hard coded paths.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Fri, 14 Jan 2011 02:28:42 +0530
changeset 392 2f7d91759bcf
parent 391 f917e7f05499
child 393 7115235f4060
Reorganized settings file to use the current filesystem path than hard coded paths.
pytask/settings.py
--- a/pytask/settings.py	Fri Jan 14 02:10:53 2011 +0530
+++ b/pytask/settings.py	Fri Jan 14 02:28:42 2011 +0530
@@ -1,7 +1,10 @@
 # Django settings for pytask project.
 
+import os
+
 from pytask.local import *
 
+
 ADMINS = (
     ('Madhusudan C.S.', 'madhusudancs@fossee.in'),
 )
@@ -15,7 +18,7 @@
 # timezone as the operating system.
 # If running in a Windows environment this must be set to the same as your
 # system time zone.
-TIME_ZONE = 'America/Chicago'
+TIME_ZONE = 'Asia/Kolkata'
 
 # Language code for this installation. All choices can be found here:
 # http://www.i18nguy.com/unicode/language-identifiers.html
@@ -33,7 +36,7 @@
 
 # Absolute filesystem path to the directory that will hold user-uploaded files.
 # Example: "/home/media/media.lawrence.com/"
-MEDIA_ROOT = './static/'
+MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'static')
 
 # 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).
@@ -69,28 +72,25 @@
     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
     # Always use forward slashes, even on Windows.
     # Don't forget to use absolute paths, not relative paths.
-    './pytask/templates',
+    os.path.join(os.path.dirname(__file__), 'templates'),
 )
 
 INSTALLED_APPS = (
+    'registration',
+    'tagging',
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.sites',
     'django.contrib.messages',
-    'registration',
-    'tagging',
+    'django.contrib.admin',
     'pytask.profile',
     'pytask.taskapp',
-    # Uncomment the next line to enable the admin:
-    'django.contrib.admin',
-    # Uncomment the next line to enable admin documentation:
-    # 'django.contrib.admindocs',
 )
 
 AUTH_PROFILE_MODULE = 'profile.Profile'
 
 #django-registration
 ACCOUNT_ACTIVATION_DAYS = 7
-DEFAULT_FROM_EMAIL = 'Admin <admin@fossee.in>'
+DEFAULT_FROM_EMAIL = 'FOSSEE Admin <admin@fossee.in>'
 LOGIN_REDIRECT_URL = '/'