Corrected/added missing google analytics and reformated code

This commit is contained in:
PCoder 2017-08-24 01:20:32 +05:30
parent ab4e7feedd
commit 4d18dc6f7c

View file

@ -37,8 +37,10 @@ def int_env(val, default_value=0):
try: try:
return_value = int(os.environ.get(val)) return_value = int(os.environ.get(val))
except Exception as e: except Exception as e:
logger.error("Encountered exception trying to get env value for {}\nException details: {}".format( logger.error(
val, str(e))) ("Encountered exception trying to get env value for {}\nException "
"details: {}").format(
val, str(e)))
return return_value return return_value
@ -169,10 +171,12 @@ TEMPLATES = [
os.path.join(PROJECT_DIR, 'membership'), os.path.join(PROJECT_DIR, 'membership'),
os.path.join(PROJECT_DIR, 'hosting/templates/'), os.path.join(PROJECT_DIR, 'hosting/templates/'),
os.path.join(PROJECT_DIR, 'nosystemd/templates/'), os.path.join(PROJECT_DIR, 'nosystemd/templates/'),
os.path.join(PROJECT_DIR, 'ungleich/templates/djangocms_blog/'), os.path.join(PROJECT_DIR,
'ungleich/templates/djangocms_blog/'),
os.path.join(PROJECT_DIR, 'ungleich/templates/cms/ungleichch'), os.path.join(PROJECT_DIR, 'ungleich/templates/cms/ungleichch'),
os.path.join(PROJECT_DIR, 'ungleich/templates/ungleich'), os.path.join(PROJECT_DIR, 'ungleich/templates/ungleich'),
os.path.join(PROJECT_DIR, 'ungleich_page/templates/ungleich_page'), os.path.join(PROJECT_DIR,
'ungleich_page/templates/ungleich_page'),
os.path.join(PROJECT_DIR, 'templates/analytics'), os.path.join(PROJECT_DIR, 'templates/analytics'),
], ],
'APP_DIRS': True, 'APP_DIRS': True,
@ -535,9 +539,12 @@ GOOGLE_ANALYTICS_PROPERTY_IDS = {
'ungleich.ch': 'UA-62285904-1', 'ungleich.ch': 'UA-62285904-1',
'digitalglarus.ch': 'UA-62285904-2', 'digitalglarus.ch': 'UA-62285904-2',
'blog.ungleich.ch': 'UA-62285904-4', 'blog.ungleich.ch': 'UA-62285904-4',
'hosting': 'UA-62285904-5', 'rails-hosting.ch': 'UA-62285904-5',
'datacenterlight.ch': 'UA-62285904-9', 'django-hosting.ch': 'UA-62285904-6',
'node-hosting.ch': 'UA-62285904-7',
'datacenterlight.ch': 'UA-62285904-8',
'devuanhosting.ch': 'UA-62285904-9',
'ipv6onlyhosting.ch': 'UA-62285904-10',
'127.0.0.1:8000': 'localhost', '127.0.0.1:8000': 'localhost',
'dynamicweb-development.ungleich.ch': 'development', 'dynamicweb-development.ungleich.ch': 'development',
'dynamicweb-staging.ungleich.ch': 'staging' 'dynamicweb-staging.ungleich.ch': 'staging'
@ -562,7 +569,8 @@ if ENABLE_DEBUG_LOGGING:
'file': { 'file': {
'level': 'DEBUG', 'level': 'DEBUG',
'class': 'logging.FileHandler', 'class': 'logging.FileHandler',
'filename': "{PROJECT_DIR}/debug.log".format(PROJECT_DIR=PROJECT_DIR), 'filename': "{PROJECT_DIR}/debug.log".format(
PROJECT_DIR=PROJECT_DIR),
}, },
}, },
'loggers': { 'loggers': {