Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

Commit

Permalink
Merge branch 'develop' of git://github.com/klen/Flask-Foundation
Browse files Browse the repository at this point in the history
  • Loading branch information
klen committed Oct 2, 2012
2 parents 3d9da3f + 5e77336 commit ad5ea8b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
10 changes: 8 additions & 2 deletions base/config/core.py
@@ -1,4 +1,7 @@
" Core configuration settings. "
""" Immutable basic settings.
"""

import logging

from base.config import op, ROOTDIR

Expand All @@ -24,4 +27,7 @@
MAIL_USE_SSL = True
MAIL_USERNAME = None
MAIL_PASSWORD = None
DEFAULT_MAIL_SENDER = MAIL_USERNAME and ('Admin <%s>' % MAIL_USERNAME) or None
DEFAULT_MAIL_SENDER = None

logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', datefmt='%d.%m %H:%M:%S')
logging.info("Core settings loaded.")
5 changes: 4 additions & 1 deletion base/config/develop.py
@@ -1,11 +1,14 @@
" Settings for develop process. "
""" Development settings.
"""

from .production import *


MODE = 'develop'
DEBUG = True
DEBUG_TB_INTERCEPT_REDIRECTS = False
SQLALCHEMY_ECHO = True

logging.info("Develop settings loaded.")

# pymode:lint_ignore=W0614,W404
2 changes: 2 additions & 0 deletions base/config/production.py
Expand Up @@ -5,6 +5,7 @@
from datetime import timedelta


MODE = 'production'
SECRET_KEY = 'SecretKeyForSessionSigning'
ADMINS = MAIL_USERNAME and [MAIL_USERNAME] or None

Expand Down Expand Up @@ -46,5 +47,6 @@
MAIL_USERNAME, MAIL_PASSWORD = f.read().strip().split(' ')
ADMINS = [MAIL_USERNAME]

logging.info("Production settings loaded.")

# pymode:lint_ignore=W0614,W404
2 changes: 2 additions & 0 deletions base/config/test.py
Expand Up @@ -3,12 +3,14 @@
from .production import *


MODE = 'test'
TESTING = True
SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'
CSRF_ENABLED = False
CACHE_TYPE = 'simple'

AUTH_USER_MIXINS += ['base.auth.tests.TestUserMixin']

logging.info("Test settings loaded.")

# pymode:lint_ignore=W0614,W404
2 changes: 2 additions & 0 deletions base/core/templates/core/base.html
Expand Up @@ -46,4 +46,6 @@
{% if config.get('FOUNDATION_METRIKA') %} {% include "core/blocks/metrika.html" %} {% endif %}
{% if config.get('FOUNDATION_ANALYTICS') %} {% include "core/blocks/analytics.html" %} {% endif %}

<!-- {{ config.get('MODE', 'unknown' ) }}:{{ config.get('DEBUG', False) }} -->

{% endblock %}

0 comments on commit ad5ea8b

Please sign in to comment.