# Path: salmon/settings/base.py
# DEBUG = False
# TEMPLATE_DEBUG = DEBUG
# SITE_ID = 1
# TIME_ZONE = 'UTC'
# USE_TZ = True
# USE_I18N = True
# USE_L10N = True
# LANGUAGE_CODE = 'en'
# LANGUAGES = (
#     ('en', 'English'),
# )
# SECRET_KEY = '+$l@=0=6ystdflyqticq8hsa_4t#ofipjbknb%8kn5s7www=04'
# INSTALLED_APPS = (
#     'salmon.core',
#     'salmon.metrics',
# 
#     'gunicorn',
#     'south',
#     'rest_framework',
# 
#     'django.contrib.auth',
#     'django.contrib.contenttypes',
#     'django.contrib.sessions',
#     'django.contrib.sites',
#     'django.contrib.messages',
#     'django.contrib.staticfiles',
#     'django.contrib.admin',
#     'django.contrib.admindocs',
# )
# PROJECT_DIR = os.path.dirname(os.path.realpath(project_module.__file__))
# PYTHON_BIN = os.path.dirname(sys.executable)
#     VAR_ROOT = os.path.join(os.path.dirname(PYTHON_BIN), 'var')
#     VAR_ROOT = os.path.join(ve_path, 'var')
#     VAR_ROOT = os.path.join(PROJECT_DIR, 'var')
# ROOT_URLCONF = 'salmon.urls'
# LOGIN_URL = '/login/'
# LOGOUT_URL = '/logout/'
# LOGIN_REDIRECT_URL = '/'
# STATIC_URL = '/static/'
# MEDIA_URL = '/uploads/'
# STATIC_ROOT = os.path.join(VAR_ROOT, 'static')
# MEDIA_ROOT = os.path.join(VAR_ROOT, 'uploads')
# STATICFILES_DIRS = (
#     os.path.join(PROJECT_DIR, 'static'),
# )
# ALLOWED_HOSTS = ['*']
# WSGI_APPLICATION = 'salmon.wsgi.application'
# DATABASES = {
#     'default': {
#         'ENGINE': 'django.db.backends.sqlite3',
#         'NAME': os.path.join(VAR_ROOT, 'salmon.db'),
#     }
# }
# TEMPLATE_DIRS = (
#     os.path.join(PROJECT_DIR, 'templates'),
# )
# SALMON_URL = "http://salmon.example.com"
# SALT_COMMAND = '/usr/bin/python /usr/bin/salt -t 1 -C {args}'
# ALERT_EMAILS = None
# EXPIRE_RESULTS = 60
# REFRESH_INTERVAL_HISTORY = 60 * 1000
# WEB_HOST = 'localhost'
# WEB_PORT = 9000
# WEB_OPTIONS = {
#     'workers': 3,
# }
# LOGGING = {
#     'version': 1,
#     'disable_existing_loggers': True,
#     'formatters': {
#         'verbose': {
#             'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
#         },
#         'simple': {
#             'format': '%(levelname)s %(message)s'
#         },
#     },
#     'filters': {
#         'require_debug_false': {
#             '()': 'django.utils.log.RequireDebugFalse'
#         },
#     },
#     'handlers': {
#         'null': {
#             'level': 'DEBUG',
#             'class': 'django.utils.log.NullHandler',
#         },
#         'console':{
#             'level': 'DEBUG',
#             'class': 'logging.StreamHandler',
#             'formatter': 'simple'
#         },
#         'mail_admins': {
#             'level': 'ERROR',
#             'filters': ['require_debug_false'],
#             'class': 'django.utils.log.AdminEmailHandler',
#         }
#     },
#     'loggers': {
#         'django': {
#             'handlers': ['mail_admins'],
#             'propagate': True,
#             'level': 'INFO',
#         },
#         'django.request': {
#             'handlers': ['mail_admins'],
#             'level': 'ERROR',
#             'propagate': False,
#         },
#         'django.db.backends': {
#             'handlers': ["null"],
#             'level': 'ERROR',
#             'propagate': False,
#         },
#         'django.security.*': {
#             'handlers': ["mail_admins"],
#             'level': 'ERROR',
#             'propagate': False,
#         },
#         'salmon.*': {
#             'handlers': ['mail_admins'],
#             'level': 'ERROR',
#             'propagate': False,
#         },
# 
#     }
# }


import base64
import os
import sys
from optparse import OptionParser
from logan.runner import run_app, parse_args, configure_app as logan_configure
from salmon.settings import base as base_settings

KEY_LENGTH = 40


def generate_settings():
    """
    This command is run when ``default_path`` doesn't exist, or ``init`` is
    run and returns a string representing the default data to put into their
    settings file.
    """

# Path: salmon/settings/base.py
# DEBUG = False
# TEMPLATE_DEBUG = DEBUG
# SITE_ID = 1
# TIME_ZONE = 'UTC'
# USE_TZ = True
# USE_I18N = True
# USE_L10N = True
# LANGUAGE_CODE = 'en'
# LANGUAGES = (
#     ('en', 'English'),
# )
# SECRET_KEY = '+$l@=0=6ystdflyqticq8hsa_4t#ofipjbknb%8kn5s7www=04'
# INSTALLED_APPS = (
#     'salmon.core',
#     'salmon.metrics',
# 
#     'gunicorn',
#     'south',
#     'rest_framework',
# 
#     'django.contrib.auth',
#     'django.contrib.contenttypes',
#     'django.contrib.sessions',
#     'django.contrib.sites',
#     'django.contrib.messages',
#     'django.contrib.staticfiles',
#     'django.contrib.admin',
#     'django.contrib.admindocs',
# )
# PROJECT_DIR = os.path.dirname(os.path.realpath(project_module.__file__))
# PYTHON_BIN = os.path.dirname(sys.executable)
#     VAR_ROOT = os.path.join(os.path.dirname(PYTHON_BIN), 'var')
#     VAR_ROOT = os.path.join(ve_path, 'var')
#     VAR_ROOT = os.path.join(PROJECT_DIR, 'var')
# ROOT_URLCONF = 'salmon.urls'
# LOGIN_URL = '/login/'
# LOGOUT_URL = '/logout/'
# LOGIN_REDIRECT_URL = '/'
# STATIC_URL = '/static/'
# MEDIA_URL = '/uploads/'
# STATIC_ROOT = os.path.join(VAR_ROOT, 'static')
# MEDIA_ROOT = os.path.join(VAR_ROOT, 'uploads')
# STATICFILES_DIRS = (
#     os.path.join(PROJECT_DIR, 'static'),
# )
# ALLOWED_HOSTS = ['*']
# WSGI_APPLICATION = 'salmon.wsgi.application'
# DATABASES = {
#     'default': {
#         'ENGINE': 'django.db.backends.sqlite3',
#         'NAME': os.path.join(VAR_ROOT, 'salmon.db'),
#     }
# }
# TEMPLATE_DIRS = (
#     os.path.join(PROJECT_DIR, 'templates'),
# )
# SALMON_URL = "http://salmon.example.com"
# SALT_COMMAND = '/usr/bin/python /usr/bin/salt -t 1 -C {args}'
# ALERT_EMAILS = None
# EXPIRE_RESULTS = 60
# REFRESH_INTERVAL_HISTORY = 60 * 1000
# WEB_HOST = 'localhost'
# WEB_PORT = 9000
# WEB_OPTIONS = {
#     'workers': 3,
# }
# LOGGING = {
#     'version': 1,
#     'disable_existing_loggers': True,
#     'formatters': {
#         'verbose': {
#             'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
#         },
#         'simple': {
#             'format': '%(levelname)s %(message)s'
#         },
#     },
#     'filters': {
#         'require_debug_false': {
#             '()': 'django.utils.log.RequireDebugFalse'
#         },
#     },
#     'handlers': {
#         'null': {
#             'level': 'DEBUG',
#             'class': 'django.utils.log.NullHandler',
#         },
#         'console':{
#             'level': 'DEBUG',
#             'class': 'logging.StreamHandler',
#             'formatter': 'simple'
#         },
#         'mail_admins': {
#             'level': 'ERROR',
#             'filters': ['require_debug_false'],
#             'class': 'django.utils.log.AdminEmailHandler',
#         }
#     },
#     'loggers': {
#         'django': {
#             'handlers': ['mail_admins'],
#             'propagate': True,
#             'level': 'INFO',
#         },
#         'django.request': {
#             'handlers': ['mail_admins'],
#             'level': 'ERROR',
#             'propagate': False,
#         },
#         'django.db.backends': {
#             'handlers': ["null"],
#             'level': 'ERROR',
#             'propagate': False,
#         },
#         'django.security.*': {
#             'handlers': ["mail_admins"],
#             'level': 'ERROR',
#             'propagate': False,
#         },
#         'salmon.*': {
#             'handlers': ['mail_admins'],
#             'level': 'ERROR',
#             'propagate': False,
#         },
# 
#     }
# }


# Path: salmon/core/runner.py
import base64
import os
import sys
from optparse import OptionParser
from logan.runner import run_app, parse_args, configure_app as logan_configure
from salmon.settings import base as base_settings


KEY_LENGTH = 40


def generate_settings():
    """
    This command is run when ``default_path`` doesn't exist, or ``init`` is
    run and returns a string representing the default data to put into their
    settings file.
    """

    conf_file = os.path.join(os.path.dirname(base_settings.__file__),