commit
e256979046
|
@ -1,9 +1,9 @@
|
|||
import os
|
||||
from collections import OrderedDict
|
||||
|
||||
# Django settings for tenant_tutorial project.
|
||||
|
||||
DEBUG = True
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
ADMINS = (
|
||||
# ('Your Name', 'your_email@example.com'),
|
||||
|
@ -24,7 +24,7 @@ DATABASES = {
|
|||
|
||||
# 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 = ['localhost', '.trendy-sass.com']
|
||||
|
||||
# Local time zone for this installation. Choices can be found here:
|
||||
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
||||
|
@ -85,11 +85,6 @@ STATICFILES_FINDERS = (
|
|||
# Make this unique, and don't share it with anybody.
|
||||
SECRET_KEY = 'as-%*_93v=r5*p_7cu8-%o6b&x^g+q$#*e*fl)k)x0-t=%q0qa'
|
||||
|
||||
# List of callables that know how to import templates from various sources.
|
||||
TEMPLATE_LOADERS = (
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
)
|
||||
|
||||
DATABASE_ROUTERS = (
|
||||
'tenant_schemas.routers.TenantSyncRouter',
|
||||
|
@ -108,22 +103,37 @@ MIDDLEWARE_CLASSES = (
|
|||
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
)
|
||||
|
||||
TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
'django.core.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.core.context_processors.debug',
|
||||
'django.core.context_processors.media',
|
||||
'django.core.context_processors.static',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
)
|
||||
|
||||
ROOT_URLCONF = 'tenant_tutorial.urls_tenants'
|
||||
PUBLIC_SCHEMA_URLCONF = 'tenant_tutorial.urls_public'
|
||||
|
||||
# Python dotted path to the WSGI application used by Django's runserver.
|
||||
WSGI_APPLICATION = 'tenant_tutorial.wsgi.application'
|
||||
|
||||
TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), '..', 'templates').replace('\\', '/'),)
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [
|
||||
os.path.join(os.path.dirname(__file__), '..', 'templates').replace('\\', '/'),
|
||||
],
|
||||
'APP_DIRS': False,
|
||||
'OPTIONS': {
|
||||
'debug': DEBUG,
|
||||
'context_processors': [
|
||||
# Insert your TEMPLATE_CONTEXT_PROCESSORS here or use this
|
||||
#~ 'django.core.context_processors.request',
|
||||
'django.template.context_processors.debug',
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
],
|
||||
# List of callables that know how to import templates from various sources.
|
||||
'loaders': [
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader', # insert your TEMPLATE_LOADERS here
|
||||
]
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
SHARED_APPS = (
|
||||
'tenant_schemas', # mandatory
|
||||
|
@ -144,7 +154,17 @@ TENANT_APPS = (
|
|||
|
||||
TENANT_MODEL = "customers.Client" # app.Model
|
||||
|
||||
INSTALLED_APPS = list(set(TENANT_APPS + SHARED_APPS))
|
||||
DEFAULT_FILE_STORAGE = 'tenant_schemas.storage.TenantFileSystemStorage'
|
||||
|
||||
INSTALLED_APPS = (
|
||||
'tenant_schemas',
|
||||
'customers',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
)
|
||||
|
||||
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
|
||||
|
||||
|
|
Loading…
Reference in New Issue