genmap / settings.py

# -*- coding: utf-8 -*-

# Django settings for genmap project.

COMMUNITY = {
    'name': 'My favorite Distro',
    'website': 'http://www.example.com/',
}

GRAVATAR = False

from local_settings import *


MANAGERS = ADMINS

# system time zone.
TIME_ZONE = 'Europe/Athens'

# Switching language via "HTTP Accept Languages" didn't work with this variable activated??
# LANGUAGE_CODE = 'en'

ugettext = lambda s: s
LANGUAGES = (
    ('en', ugettext('English')),
    ('el', ugettext('Greek')),
    ('de', ugettext('German')),
)

LOGIN_REDIRECT_URL = '/profile/'
SITE_ID = 1

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True


#For django-registration
ACCOUNT_ACTIVATION_DAYS = 10

#for caching
CACHE_BACKEND = 'file:///tmp/gu_dj_cache'





# Make this unique, and don't share it with anybody.
SECRET_KEY = '23-j-_uh793rd7-f#=9clyk@b=a=&1l3f^+(ko8tai!mtyvf$1'

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.load_template_source',
    'django.template.loaders.app_directories.load_template_source',
#     'django.template.loaders.eggs.load_template_source',

)

TEMPLATE_CONTEXT_PROCESSORS = (
    'django.core.context_processors.auth',
    'django.core.context_processors.request',
    'django.core.context_processors.media',
    'genmap.context_processors.google_key',
    'genmap.context_processors.google_analytics',
    'genmap.context_processors.community',
    'genmap.context_processors.this_site',
)


MIDDLEWARE_CLASSES = (
    'django.middleware.gzip.GZipMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'genmap.middleware.lang.DefaultLanguage',
    'django.middleware.locale.LocaleMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.middleware.doc.XViewMiddleware',
    #'django.middleware.http.SetRemoteAddrFromForwardedFor',
    'genmap.middleware.ajaxdebug.AJAXSimpleExceptionResponse',
    #'genmap.middleware.threadlocals.ThreadLocals',
    'django_openid.consumer.SessionConsumer',
)

ROOT_URLCONF = 'genmap.urls'

TEMPLATE_DIRS = (
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    PROJECT_ROOT + 'templates/',
)


AUTH_PROFILE_MODULE = 'profile.Profile'
INSTALLED_APPS = [
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.admin',
    'django.contrib.markup',
    'django.contrib.gis',
    'genmap.profile',
    'genmap.search',
    'genmap.blog',
    'sorl.thumbnail',
    'django_openid',
    'tagging',
]
if GRAVATAR: INSTALLED_APPS.append('gravatar')

# Default image for avatars
DEFAULT_AVATAR = GRAVATAR_DEFAULT_IMAGE = MEDIA_URL + 'images/noavatar.png'
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.