text: """
  Django settings for coins_project project.
  
  For more information on this file, see
  https://docs.djangoproject.com/en/dev/topics/settings/
  
  For the full list of settings and their values, see
  https://docs.djangoproject.com/en/dev/ref/settings/
  """
  
  # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  import os
  import django
  BASE_DIR = os.path.dirname(os.path.dirname(__file__))
  
  
  # Quick-start development settings - unsuitable for production
  # See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/
  
  # SECURITY WARNING: don't run with debug turned on in production!
  DEBUG = False
  
  TEMPLATE_DEBUG = True
  
  ALLOWED_HOSTS = []
  
  
  # Application definition
  
  INSTALLED_APPS = (
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'coins',
  )
  
  MIDDLEWARE_CLASSES = (
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
  )
  
  ROOT_URLCONF = 'coins_project.urls'
  
  WSGI_APPLICATION = 'coins_project.wsgi.application'
  
  
  # Database
  # https://docs.djangoproject.com/en/dev/ref/settings/#databases
  
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.sqlite3',
          'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
      }
  }
  
  # Internationalization
  # https://docs.djangoproject.com/en/dev/topics/i18n/
  
  LANGUAGE_CODE = 'ru'
  
  TIME_ZONE = 'Europe/Moscow'
  
  USE_I18N = True
  
  USE_L10N = True
  
  USE_TZ = False
  
  try:
      from secret import SECRET_KEY
  except ImportError:
      def gen_secret_key():
          here = lambda x: os.path.abspath(os.path.join(os.path.dirname(__file__), x))
          print "Django's SECRET_KEY not found, generating new."
          from random import choice
          secret_key = ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)])
          f = open(here('secret.py'), 'w')
          f.write('''# Make this unique, and don't share it with anybody.\nSECRET_KEY = '%s'\n''' % secret_key)
          f.close()
      gen_secret_key()
      from secret import SECRET_KEY
  
  
  DJANGO_DIR = os.path.dirname(os.path.realpath(django.__file__))
  
  CACHE_DIR = BASE_DIR + '/cache/'
  
  # Absolute filesystem path to the directory that will hold user-uploaded files.
  # Example: "/var/www/example.com/media/"
  MEDIA_ROOT = BASE_DIR + '/media/'
  
  # URL that handles the media served from MEDIA_ROOT. Make sure to use a
  # trailing slash.
  # Examples: "http://example.com/media/", "http://media.example.com/"
  MEDIA_URL = '/media/'
  
  # 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 = BASE_DIR + '/static/'
  
  # Static files (CSS, JavaScript, Images)
  # https://docs.djangoproject.com/en/dev/howto/static-files/
  
  STATIC_URL = '/static/'
  
  # Additional locations of static files
  STATICFILES_DIRS = (
      # 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.
      DJANGO_DIR + '/contrib/admin/static',
  )
  
  UPLOAD_DIR = 'img'
  
  TEMPLATE_DIRS = (
      BASE_DIR + '/templates',
  )
  
  try:
      LOCAL_SETTINGS
  except NameError:
      try:
          from local_settings import *
      except ImportError:
          pass
  