mirror of
https://github.com/nikdoof/limetime.git
synced 2025-12-13 09:42:26 +00:00
Cleanup of settings and addition of debug toolbar and tastypie
This commit is contained in:
@@ -1,100 +1,49 @@
|
|||||||
# Django settings for limetime project.
|
import os
|
||||||
|
|
||||||
DEBUG = True
|
DEBUG = False
|
||||||
TEMPLATE_DEBUG = DEBUG
|
TEMPLATE_DEBUG = DEBUG
|
||||||
|
|
||||||
ADMINS = (
|
|
||||||
# ('Your Name', 'your_email@example.com'),
|
|
||||||
)
|
|
||||||
|
|
||||||
MANAGERS = ADMINS
|
|
||||||
|
|
||||||
# Hosts/domain names that are valid for this site; required if DEBUG is False
|
|
||||||
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
|
|
||||||
ALLOWED_HOSTS = []
|
ALLOWED_HOSTS = []
|
||||||
|
|
||||||
# Local time zone for this installation. Choices can be found here:
|
|
||||||
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
|
||||||
# although not all choices may be available on all operating systems.
|
|
||||||
# In a Windows environment this must be set to your system time zone.
|
|
||||||
TIME_ZONE = 'UTC'
|
TIME_ZONE = 'UTC'
|
||||||
|
|
||||||
# Language code for this installation. All choices can be found here:
|
|
||||||
# http://www.i18nguy.com/unicode/language-identifiers.html
|
|
||||||
LANGUAGE_CODE = 'en-us'
|
LANGUAGE_CODE = 'en-us'
|
||||||
|
|
||||||
SITE_ID = 1
|
|
||||||
|
|
||||||
# If you set this to False, Django will make some optimizations so as not
|
|
||||||
# to load the internationalization machinery.
|
|
||||||
USE_I18N = True
|
USE_I18N = True
|
||||||
|
|
||||||
# If you set this to False, Django will not format dates, numbers and
|
|
||||||
# calendars according to the current locale.
|
|
||||||
USE_L10N = True
|
USE_L10N = True
|
||||||
|
|
||||||
# If you set this to False, Django will not use timezone-aware datetimes.
|
|
||||||
USE_TZ = True
|
USE_TZ = True
|
||||||
|
|
||||||
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
MEDIA_ROOT = os.path.join(os.path.dirname(__file__), '..', '..', '..', 'media')
|
||||||
# Example: "/var/www/example.com/media/"
|
MEDIA_URL = '/media/'
|
||||||
MEDIA_ROOT = ''
|
|
||||||
|
|
||||||
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
STATIC_ROOT = os.path.join(os.path.dirname(__file__), '..', '..', '..', 'static')
|
||||||
# trailing slash.
|
|
||||||
# Examples: "http://example.com/media/", "http://media.example.com/"
|
|
||||||
MEDIA_URL = ''
|
|
||||||
|
|
||||||
# Absolute path to the directory static files should be collected to.
|
|
||||||
# Don't put anything in this directory yourself; store your static files
|
|
||||||
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
|
||||||
# Example: "/var/www/example.com/static/"
|
|
||||||
STATIC_ROOT = ''
|
|
||||||
|
|
||||||
# URL prefix for static files.
|
|
||||||
# Example: "http://example.com/static/", "http://static.example.com/"
|
|
||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
|
|
||||||
# Additional locations of static files
|
STATICFILES_DIRS = [
|
||||||
STATICFILES_DIRS = (
|
os.path.join(os.path.dirname(__file__), '..', 'static'),
|
||||||
# Put strings here, like "/home/html/static" or "C:/www/django/static".
|
]
|
||||||
# Always use forward slashes, even on Windows.
|
|
||||||
# Don't forget to use absolute paths, not relative paths.
|
|
||||||
)
|
|
||||||
|
|
||||||
# List of finder classes that know how to find static files in
|
|
||||||
# various locations.
|
|
||||||
STATICFILES_FINDERS = (
|
STATICFILES_FINDERS = (
|
||||||
'django.contrib.staticfiles.finders.FileSystemFinder',
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||||
)
|
)
|
||||||
|
|
||||||
# Make this unique, and don't share it with anybody.
|
|
||||||
SECRET_KEY = '$+y3w%y3286wetd#tqhvqch$^ed)x=#s$we1c2)d1&lf9quktl'
|
|
||||||
|
|
||||||
# List of callables that know how to import templates from various sources.
|
|
||||||
TEMPLATE_LOADERS = (
|
TEMPLATE_LOADERS = (
|
||||||
'django.template.loaders.filesystem.Loader',
|
'django.template.loaders.filesystem.Loader',
|
||||||
'django.template.loaders.app_directories.Loader',
|
'django.template.loaders.app_directories.Loader',
|
||||||
)
|
)
|
||||||
|
|
||||||
MIDDLEWARE_CLASSES = (
|
TEMPLATE_DIRS = [
|
||||||
|
os.path.join(os.path.dirname(__file__), '..', 'templates'),
|
||||||
|
]
|
||||||
|
|
||||||
|
MIDDLEWARE_CLASSES = [
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
'django.middleware.csrf.CsrfViewMiddleware',
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
'django.contrib.messages.middleware.MessageMiddleware',
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
)
|
]
|
||||||
|
|
||||||
ROOT_URLCONF = 'limetime.urls'
|
INSTALLED_APPS = [
|
||||||
|
|
||||||
# Python dotted path to the WSGI application used by Django's runserver.
|
|
||||||
WSGI_APPLICATION = 'limetime.wsgi.application'
|
|
||||||
|
|
||||||
import os
|
|
||||||
TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), '../templates').replace('\\','/'),)
|
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
@@ -104,7 +53,13 @@ INSTALLED_APPS = (
|
|||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
'gunicorn',
|
'gunicorn',
|
||||||
'timer',
|
'timer',
|
||||||
)
|
]
|
||||||
|
|
||||||
|
SITE_ID = 1
|
||||||
|
ROOT_URLCONF = 'limetime.urls'
|
||||||
|
WSGI_APPLICATION = 'limetime.wsgi.application'
|
||||||
|
SECRET_KEY = '$+y3w%y3286wetd#tqhvqch$^ed)x=#s$we1c2)d1&lf9quktl'
|
||||||
|
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||||
|
|
||||||
LOGGING = {
|
LOGGING = {
|
||||||
'version': 1,
|
'version': 1,
|
||||||
|
|||||||
@@ -2,5 +2,24 @@ import os
|
|||||||
import dj_database_url
|
import dj_database_url
|
||||||
from .base import *
|
from .base import *
|
||||||
|
|
||||||
|
DEBUG = True
|
||||||
|
TEMPLATE_DEBUG = DEBUG
|
||||||
|
|
||||||
default_db_url = 'sqlite:///%s' % os.path.join(os.path.dirname(__file__), '..', '..', '..', 'limetime.db3')
|
default_db_url = 'sqlite:///%s' % os.path.join(os.path.dirname(__file__), '..', '..', '..', 'limetime.db3')
|
||||||
DATABASES = {'default': dj_database_url.config(default=default_db_url)}
|
DATABASES = {'default': dj_database_url.config(default=default_db_url)}
|
||||||
|
|
||||||
|
INTERNAL_IPS = ('127.0.0.1', '192.168.0.1', '0.0.0.0')
|
||||||
|
INSTALLED_APPS.append('debug_toolbar')
|
||||||
|
MIDDLEWARE_CLASSES.append('debug_toolbar.middleware.DebugToolbarMiddleware')
|
||||||
|
|
||||||
|
def custom_show_toolbar(request):
|
||||||
|
return True
|
||||||
|
|
||||||
|
DEBUG_TOOLBAR_CONFIG = {
|
||||||
|
'INTERCEPT_REDIRECTS': False,
|
||||||
|
'SHOW_TOOLBAR_CALLBACK': custom_show_toolbar,
|
||||||
|
'EXTRA_SIGNALS': [],
|
||||||
|
'HIDE_DJANGO_SQL': True,
|
||||||
|
'TAG': 'div',
|
||||||
|
'ENABLE_STACKTRACES' : True,
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
django>=1.5,<1.6
|
django>=1.5,<1.6
|
||||||
eveapi
|
eveapi
|
||||||
dj_database_url
|
dj_database_url
|
||||||
gunicorn
|
gunicorn
|
||||||
|
django_tastypie
|
||||||
|
django-debug-toolbar
|
||||||
Reference in New Issue
Block a user