Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: klen/fquest
base: 3d9da3fe2e
...
head fork: klen/fquest
compare: ad5ea8b601
  • 3 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
10 base/config/core.py
View
@@ -1,4 +1,7 @@
-" Core configuration settings. "
+""" Immutable basic settings.
+"""
+
+import logging
from base.config import op, ROOTDIR
@@ -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 base/config/develop.py
View
@@ -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  base/config/production.py
View
@@ -5,6 +5,7 @@
from datetime import timedelta
+MODE = 'production'
SECRET_KEY = 'SecretKeyForSessionSigning'
ADMINS = MAIL_USERNAME and [MAIL_USERNAME] or None
@@ -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  base/config/test.py
View
@@ -3,6 +3,7 @@
from .production import *
+MODE = 'test'
TESTING = True
SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'
CSRF_ENABLED = False
@@ -10,5 +11,6 @@
AUTH_USER_MIXINS += ['base.auth.tests.TestUserMixin']
+logging.info("Test settings loaded.")
# pymode:lint_ignore=W0614,W404
2  base/core/templates/core/base.html
View
@@ -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 %}

No commit comments for this range

Something went wrong with that request. Please try again.