← Back to team overview

team4alfanous team mailing list archive

[Branch ~team4alfanous/alfanous/alfanous-git] Rev 517: move MEDIA_ROOT and STATIC_URL from settings.py to settings.ini

 

------------------------------------------------------------
revno: 517
committer: Assem Chelli <assem.ch@xxxxxxxxx>
timestamp: Mon 2013-01-07 00:06:49 +0100
message:
  move MEDIA_ROOT and STATIC_URL from settings.py to settings.ini
modified:
  src/alfanous-django/settings.ini.proto
  src/alfanous-django/settings.py


--
lp:alfanous
https://code.launchpad.net/~team4alfanous/alfanous/alfanous-git

Your team Alfanous team is subscribed to branch lp:alfanous.
To unsubscribe from this branch go to https://code.launchpad.net/~team4alfanous/alfanous/alfanous-git/+edit-subscription
=== modified file 'src/alfanous-django/settings.ini.proto'
--- src/alfanous-django/settings.ini.proto	2013-01-06 01:10:06 +0000
+++ src/alfanous-django/settings.ini.proto	2013-01-06 23:06:49 +0000
@@ -5,11 +5,9 @@
 DATABASE_PORT:
 DATABASE_ENGINE: django.db.backends.sqlite3
 DATABASE_NAME: wui.db
-TESTSUITE_DATABASE_NAME: test_blo
 
 [secrets]
 SECRET_KEY: kl2wmaaul8-roi3k9*@1j9kse%z^durtud=8l-*6+r#h2mo*80
-CSRF_MIDDLEWARE_SECRET: random-string-of-ascii
 
 [cookies]
 SESSION_COOKIE_DOMAIN:
@@ -19,23 +17,10 @@
 [debug]
 DEBUG: true
 TEMPLATE_DEBUG: true
-VIEW_TEST: true
-INTERNAL_IPS: 127.0.0.1
-SKIP_CSRF_MIDDLEWARE: true
 
 [paths]
-MEDIA_URL: http://127.0.0.1:8000/media
+MEDIA_URL: /media/
+MEDIA_ROOT: ./media/
+STATIC_URL: /static/
 STATIC_ROOT: /QSE/root/alfanous_git/alfanous-code/src/alfanous-django/static/
 
-[email]
-SERVER_EMAIL: django@localhost
-EMAIL_HOST: localhost
-
-# the [error mail] and [404 mail] sections are special. Just add lines with
-# full name: email_address@xxxxxxxxx
-# each section must be present but may be empty.
-[error mail]
-Adam Smith: adam@localhost
-
-[404 mail]
-John Wayne: john@localhost

=== modified file 'src/alfanous-django/settings.py'
--- src/alfanous-django/settings.py	2013-01-06 01:24:38 +0000
+++ src/alfanous-django/settings.py	2013-01-06 23:06:49 +0000
@@ -25,16 +25,19 @@
 DATABASE_PORT = config.get('database', 'DATABASE_PORT')
 DATABASE_ENGINE = config.get('database', 'DATABASE_ENGINE')
 DATABASE_NAME = config.get('database', 'DATABASE_NAME')
-# TEST_DATABASE_NAME = config.get('database', 'TESTSUITE_DATABASE_NAME')
+
 MY_DEBUG = config.get( 'debug', 'DEBUG' ) in ["true", "True"]
 MY_TEMPLATE_DEBUG = config.get( 'debug', 'TEMPLATE_DEBUG' ) in ["true", "True"]
 
 MY_SECRET_KEY =  config.get('secrets', 'SECRET_KEY')
 
 MY_MEDIA_URL = config.get('paths', 'MEDIA_URL')
+MY_MEDIA_ROOT = config.get( 'paths', 'MEDIA_ROOT' )
+MY_STATIC_URL = config.get( 'paths', 'STATIC_URL' )
 MY_STATIC_ROOT = config.get('paths', 'STATIC_ROOT')
 
 
+
 ########################################
 #     Static and Public settings       #
 ########################################
@@ -87,7 +90,7 @@
 
 # Absolute filesystem path to the directory that will hold user-uploaded files.
 # Example: "/home/media/media.lawrence.com/media/"
-MEDIA_ROOT = './media/'
+MEDIA_ROOT = MY_MEDIA_ROOT
 
 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
 # trailing slash.
@@ -102,7 +105,7 @@
 
 # URL prefix for static files.
 # Example: "http://media.lawrence.com/static/";
-STATIC_URL = '/static/'
+STATIC_URL = MY_STATIC_URL
 
 # URL prefix for admin static files -- CSS, JavaScript and images.
 # Make sure to use a trailing slash.