<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
from {{cookiecutter.app_name}}.apps.www import www
from {{cookiecutter.app_name}}.apps.users import users


class DefaultConfig(object):
    DEBUG = True

    PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
    PROJECT_NAME = "{{cookiecutter.app_name}}"
    SECRET_KEY = "PLEASE_CHANGE_ME"

    SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/test.db'
    DEBUG_TB_INTERCEPT_REDIRECTS = False

    STATIC_DIR = os.path.join(PROJECT_ROOT, '{{cookiecutter.app_name}}', 'apps', 'static')
    TEMPLATE_DIR = os.path.join(PROJECT_ROOT, '{{cookiecutter.app_name}}', 'apps', 'templates')

    BLUEPRINTS = (www, users)

    LOG_INI = 'etc/logging.ini.json'

    CONFIRMATION_TOKEN_SALT = "<PASSWORD>"

    # Flask-Mail
    MAIL_SERVER = "localhost"
    MAIL_PORT = "1025"
    MAIL_USE_TLS = False
    MAIL_USE_SSL = False
    MAIL_DEBUG = DEBUG
    MAIL_USERNAME = None
    MAIL_PASSWORD = <PASSWORD>
    MAIL_DEFAULT_SENDER = None
    MAIL_MAX_EMAILS = None
    MAIL_SUPPRESS_SEND = False
    MAIL_ASCII_ATTACHMENTS = False

# vim: filetype=python<commit_msg>Added functionality to pull from env vars<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
from os import environ as env
from {{cookiecutter.app_name}}.apps.www import www
from {{cookiecutter.app_name}}.apps.users import users


def as_bool(key, default):
    return env.get(key, str(default)).lower() \
        in ("yes", "true", "t", "1")


class DefaultConfig(object):

    DEBUG = as_bool('DEBUG', True)

    PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
    PROJECT_NAME = "{{cookiecutter.app_name}}"
    SECRET_KEY = env.get('SECRET_KEY', 'PLEASE_CHANGE_ME')

    SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/test.db'
    DEBUG_TB_INTERCEPT_REDIRECTS = as_bool('DEBUG_TB_INTERCEPT_REDIRECTS',
        False)

    STATIC_DIR = os.path.join(PROJECT_ROOT, '{{cookiecutter.app_name}}', 'apps', 'static')
    TEMPLATE_DIR = os.path.join(PROJECT_ROOT, '{{cookiecutter.app_name}}', 'apps', 'templates')

    BLUEPRINTS = (www, users)

    LOG_INI = 'etc/logging.ini.json'

    CONFIRMATION_TOKEN_SALT = env.get('CONFIRMATION_TOKEN_SALT',
                                      'PLEASE_CHANGE_ME')

    # Flask-Mail
    MAIL_SERVER = env.get('MAIL_SERVER,', 'localhost')
    MAIL_PORT = env.get('MAIL_PORT,', '1025')
    MAIL_USE_TLS = as_bool('MAIL_USE_TLS', False)
    MAIL_USE_SSL = as_bool('MAIL_USE_SSL', False)
    MAIL_DEBUG = DEBUG
    MAIL_USERNAME = env.get('MAIL_USERNAME', None)
    MAIL_PASSWORD = env.get('MAIL_PASSWORD', None)
    MAIL_DEFAULT_SENDER = env.get('MAIL_DEFAULT_SENDER', None)
    MAIL_MAX_EMAILS = env.get('MAIL_MAX_EMAILS', None)
    MAIL_SUPPRESS_SEND = as_bool('MAIL_USE_SSL', False)
    MAIL_ASCII_ATTACHMENTS = as_bool('MAIL_USE_SSL', False)

# vim: filetype=python
{'fraction_non_alphanumeric': 0.13485113835376533, 'fraction_numerical': 0.003852889667250438, 'mean_word_length': 3.9326424870466323, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6183851', 'n_tokens_mistral': 1100, 'n_tokens_neox': 1080, 'n_words': 176}