135 lines
3.3 KiB
Python
135 lines
3.3 KiB
Python
import os
|
|
from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS as TCP
|
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
|
|
|
DEBUG = True
|
|
TEMPLATE_DEBUG = DEBUG
|
|
|
|
ADMINS = (
|
|
('System Administrator', 'sysadmin@example.com'),
|
|
)
|
|
|
|
MANAGERS = ADMINS
|
|
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
|
'NAME': 'db.sqlite3',
|
|
}
|
|
}
|
|
TIME_ZONE = 'Europe/Oslo'
|
|
LANGUAGE_CODE = 'en-us'
|
|
|
|
SITE_ID = 1
|
|
|
|
USE_I18N = True
|
|
USE_L10N = True
|
|
|
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
|
MEDIA_URL = '/media/'
|
|
ADMIN_MEDIA_PREFIX = '/media/'
|
|
|
|
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
|
STATIC_URL = '/static/'
|
|
|
|
|
|
# Additional locations of static files
|
|
STATICFILES_DIRS = (
|
|
)
|
|
|
|
# List of finder classes that know how to find static files in
|
|
# various locations.
|
|
STATICFILES_FINDERS = (
|
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
|
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
|
|
)
|
|
|
|
# Make this unique, and don't share it with anybody.
|
|
SECRET_KEY = '@4ps=ebofcpv8sb#y7gm896=l&l*u0u-pgo7bcdj%+(k+2lqnl'
|
|
|
|
MIDDLEWARE_CLASSES = (
|
|
'django.middleware.common.CommonMiddleware',
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
|
)
|
|
|
|
ROOT_URLCONF = 'mdbsite.urls'
|
|
|
|
TEMPLATE_DIRS = (
|
|
# 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.
|
|
)
|
|
|
|
INSTALLED_APPS = (
|
|
'django.contrib.auth',
|
|
'django.contrib.contenttypes',
|
|
'django.contrib.sessions',
|
|
'django.contrib.sites',
|
|
'django.contrib.messages',
|
|
'django.contrib.staticfiles',
|
|
'suit',
|
|
'django.contrib.admin',
|
|
'rest_framework',
|
|
'rest_framework.authtoken',
|
|
'django_extensions',
|
|
|
|
'mdb',
|
|
)
|
|
|
|
EMAIL_SUBJECT_PREFIX = '[MDB] '
|
|
|
|
TEMPLATE_CONTEXT_PROCESSORS = TCP + (
|
|
'django.core.context_processors.request', # for django-suit
|
|
)
|
|
|
|
# django-suit configuration
|
|
SUIT_CONFIG = {
|
|
# header
|
|
'ADMIN_NAME': 'MDB',
|
|
'HEADER_DATE_FORMAT': 'l, Y-m-d',
|
|
'HEADER_TIME_FORMAT': 'H:i',
|
|
|
|
# forms
|
|
# 'SHOW_REQUIRED_ASTERISK': True, # Default True
|
|
# 'CONFIRM_UNSAVED_CHANGES': True, # Default True
|
|
|
|
# menu
|
|
'SEARCH_URL': '/admin/mdb/host/',
|
|
# 'MENU_ICONS': {
|
|
# 'sites': 'icon-leaf',
|
|
# 'auth': 'icon-lock',
|
|
# },
|
|
# 'MENU_OPEN_FIRST_CHILD': True, # Default True
|
|
# 'MENU_EXCLUDE': ('auth.group',),
|
|
'MENU': (
|
|
{'app': 'mdb', 'label': 'MDB', 'url': 'mdb.host'},
|
|
{
|
|
'label': 'Settings',
|
|
'icon': 'icon-cog',
|
|
'models': ('auth.user', 'auth.group')
|
|
},
|
|
),
|
|
|
|
# misc
|
|
'LIST_PER_PAGE': 35
|
|
}
|
|
REST_FRAMEWORK = {
|
|
'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAuthenticated',),
|
|
'PAGINATE_BY': 10
|
|
}
|
|
|
|
MDB_PXE_TFTP_ROOT = '/var/lib/tftpboot/pxelinux/pxelinux.cfg/'
|
|
MDB_PXE_KERNEL = 'ubuntu/14_04/amd64/alternate/linux'
|
|
MDB_PXE_INITRD = 'ubuntu/14_04/amd64/alternate/initrd.gz'
|
|
MDB_PXE_PRESEED_URL = 'http://158.36.190.194/ubuntu/preseed_1404.cfg'
|
|
|
|
try:
|
|
from .local_settings import *
|
|
except ImportError:
|
|
pass
|