SHARE
TWEET

Untitled

seilorsamoor Nov 9th, 2016 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if socket.gethostname() == 'twin.homenetwork':
  2.     DEBUG = True
  3.     ALLOWED_HOSTS = ['']
  4.     DATABASES = {
  5.         'default': {
  6.             'ENGINE': 'django.db.backends.sqlite3',
  7.             'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
  8.         }
  9.     }
  10. else:
  11.     DEBUG = False
  12.     NAME = os.environ['USER']
  13.     DATABASE_NAME = NAME
  14.     ALLOWED_HOSTS = ['*']
  15.     DATABASES = {
  16.         'default': {
  17.             'ENGINE': 'django.db.backends.postgresql_psycopg2',
  18.             'NAME': DATABASE_NAME,
  19.             'HOST': '',
  20.             'USER': NAME,
  21.             'PASSWORD': '',
  22.             'PORT': ''
  23.         }
  24.     }
  25.  
  26.     CACHES = {
  27.         'default': {
  28.             'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
  29.             'LOCATION': 'unique-snowflake'
  30.             }
  31.     }
  32.  
  33. TEMPLATES = [
  34.     {
  35.         'BACKEND': 'django.template.backends.django.DjangoTemplates',
  36.         'DIRS': [
  37.             os.path.join(BASE_DIR, "templates"),
  38.         ],
  39.         'APP_DIRS': True,
  40.         'OPTIONS': {
  41.             'context_processors': [
  42.                 'django.template.context_processors.debug',
  43.                 'django.template.context_processors.request',
  44.                 'django.contrib.auth.context_processors.auth',
  45.                 'django.contrib.messages.context_processors.messages',
  46.                 'sekizai.context_processors.sekizai',
  47.                 'cms.context_processors.cms_settings',
  48.                 'django.template.context_processors.i18n',
  49.                 'zinnia.context_processors.version',
  50.                 'contacts.context_processors.contacts',
  51.             ],
  52.         },
  53.     },
  54. ]
  55.  
  56. CMS_TEMPLATES = (
  57.     ('cmszp/page.html', _('Page')),
  58.     ('cmszp/home.html', _('Home page')),
  59.     ('contacts/contacts.html', _('Contacts')),
  60. )
  61.  
  62. CMSPLUGIN_ZINNIA_TEMPLATES = [
  63.     ('cmsplugin_zinnia/small_block_grid_2.html', _('Block grid for images')),
  64.   ]
  65.  
  66. STATICFILES_DIRS = (
  67.     os.path.join(BASE_DIR, 'cmszp', 'static'),
  68. )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top