Move some files around, local_settings.py, gogo

This commit is contained in:
nikolark committed 2015-01-08 01:48:49 +01:00
1 parent 292235858e
commit 14c57bf9eb
7 files changed
+23 -28

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
*.swp *.swp
*.pyc *.pyc
settings.py local_settings.py
dev.db db.sqlite3
static/.sass-cache static/.sass-cache
uploads/[^.]* uploads/[^.]*
venv venv
View File
File renamed without changes.
+14 -10
View File
@@ -1,10 +1,7 @@
# Django settings for bbs project. # Django settings for bbs project.
from os.path import dirname, join
import os
def map_path(target_name): BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Enables path names to be decided at runtime.
return join(dirname(__file__), target_name).replace('\\', '/')
DEBUG = True DEBUG = True
TEMPLATE_DEBUG = DEBUG TEMPLATE_DEBUG = DEBUG
@@ -18,7 +15,7 @@ MANAGERS = ADMINS
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'dev.db', # Or path to database file if using sqlite3. 'NAME': 'db.sqlite3', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3. 'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
@@ -78,7 +75,7 @@ STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static". # Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows. # Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths. # Don't forget to use absolute paths, not relative paths.
map_path('static'), os.path.join(BASE_DIR, 'static'),
) )
# List of finder classes that know how to find static files in # List of finder classes that know how to find static files in
@@ -108,13 +105,13 @@ MIDDLEWARE_CLASSES = (
'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.messages.middleware.MessageMiddleware',
) )
ROOT_URLCONF = 'urls' ROOT_URLCONF = 'bbssite.urls'
TEMPLATE_DIRS = ( TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows. # Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths. # Don't forget to use absolute paths, not relative paths.
map_path('templates'), os.path.join(BASE_DIR, 'templates'),
) )
INSTALLED_APPS = ( INSTALLED_APPS = (
@@ -130,6 +127,7 @@ INSTALLED_APPS = (
'south', 'south',
'bootstrapform', 'bootstrapform',
'compressor', 'compressor',
# 'django_extensions',
) )
# A sample logging configuration. The only tangible logging # A sample logging configuration. The only tangible logging
@@ -160,10 +158,16 @@ AUTH_PROFILE_MODULE = 'main.UserProfile'
LOGIN_REDIRECT_URL = '/' LOGIN_REDIRECT_URL = '/'
SESSION_COOKIE_AGE = 900 # 15 minutes SESSION_COOKIE_AGE = 1209600 # 15 minutes
SESSION_EXPIRE_AT_BROWSER_CLOSE = True SESSION_EXPIRE_AT_BROWSER_CLOSE = True
BBS_SALDO_MAX = 600 BBS_SALDO_MAX = 600
BBS_LIMIT_DEPOSITS = False BBS_LIMIT_DEPOSITS = False
if not DEBUG:
COMPRESS_ENABLED = True COMPRESS_ENABLED = True
try:
from local_settings import *
except ImportError:
pass
View File
File renamed without changes.
+6
View File
@@ -0,0 +1,6 @@
import os
import django.core.handlers.wsgi
os.environ['DJANGO_SETTINGS_MODULE'] = 'bbssite.settings'
application = django.core.handlers.wsgi.WSGIHandler()
-15
View File
@@ -1,15 +0,0 @@
import os
import sys
from os.path import dirname, join
def map_path(target_name=''):
'''Enables path names to be decided at runtime.'''
return join(dirname(__file__), target_name).replace('\\', '/')
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
path = map_path(".")
if path not in sys.path:
sys.path.append(path)
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
+1 -1
View File
@@ -3,7 +3,7 @@ import os
import sys import sys
if __name__ == "__main__": if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bbssite.settings")
from django.core.management import execute_from_command_line from django.core.management import execute_from_command_line