Skip to content

Instantly share code, notes, and snippets.

@krusty
Created March 7, 2012 18:12
Show Gist options
  • Save krusty/1994791 to your computer and use it in GitHub Desktop.
Save krusty/1994791 to your computer and use it in GitHub Desktop.
# copy this file to local_settings.py and modify as necessary
DATABASE_SCHEMA = 'fbsec'
DATABASE_PASSWORD = ''
DATABASE_LOGIN = 'root'
DATABASE_SERVER = 'localhost'
# fetched from user_data in production
#DATABASE_SERVER = "reppler-prod.csjmdegnz98g.us-east-1.rds.amazonaws.com"
TYPE= 'ALL'
MONGODB_URI = '127.0.0.1'
MONGODB_NAME= 'reppler-smb'
DEBUG=True
DEBUG_QUEUE=True
HTTPS_SUPPORT=False
IP='127.0.0.1'
ENV='DEV'
LOG_SERVER=IP
import os
import logging
from logging.handlers import SysLogHandler
def relative(additional_path, this_file=__file__):
return os.path.join(os.path.dirname(os.path.abspath(this_file)), additional_path)
TEST_DATA_PATH = relative('../test/data/')
import django
if float("%s.%s" % (django.VERSION[0], django.VERSION[1])) > 1.2:
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
'TIMEOUT': 604800,
}
}
else:
CACHE_BACKEND = 'memcached://127.0.0.1:11211/?timeout=604800'
LOG_FILENAME = '/home/lucas/proyects/safetobeme/logs/safetobeme.log'
logging.basicConfig(filename=LOG_FILENAME,
format="%%(asctime)s - %%(name)s - %%(process)d - %%(levelname)s [%s %s %s %s] - %%(message)s" % (IP, TYPE, ENV, str(os.getpid())),
filemode = 'w',
level=logging.INFO)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment