Commit b615cf58 authored by Claude Paroz's avatar Claude Paroz

Updated file structure to new Django versions (incl. wsgi file)

parent 157ff702
*.pyc
locale
local_settings.py
damnedlies/local_settings.py
/static
......@@ -11,8 +11,7 @@ STATIC_SERVE = True
USE_DEBUG_TOOLBAR = False
USE_DJANGO_OPENID = False
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
PROJECT_NAME = PROJECT_PATH.split('/')[-1]
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
ADMINS = (
('Your Name', 'your_address@example.org'),
......@@ -23,7 +22,7 @@ MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME' : os.path.join(PROJECT_PATH, 'database.db'),
'NAME' : os.path.join(BASE_DIR, 'database.db'),
}
}
# Please refer to the README file to create an UTF-8 database with MySQL.
......@@ -62,17 +61,17 @@ SITE_ID = 1
USE_I18N = True
USE_L10N = True
LOCALE_PATHS = (
os.path.join(PROJECT_PATH, 'locale'),
os.path.join(BASE_DIR, 'locale'),
)
# Absolute path to the directory that holds media.
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
MEDIA_ROOT = os.path.join(BASE_DIR, '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).
MEDIA_URL = '/media/'
STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
......@@ -116,10 +115,10 @@ MIDDLEWARE_CLASSES = (
'django.middleware.transaction.TransactionMiddleware',
)
ROOT_URLCONF = 'urls'
ROOT_URLCONF = 'damnedlies.urls'
TEMPLATE_DIRS = (
os.path.join(PROJECT_PATH, 'templates'),
os.path.join(BASE_DIR, 'templates'),
)
INSTALLED_APPS = (
......
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "damnedlies.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
......@@ -3,7 +3,7 @@ import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "damnedlies.settings")
from django.core.management import execute_from_command_line
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment