Exemplo n.º 1
0
CSRF_COOKIE_SECURE = True

ALLOWED_HOSTS = ['localhost',
                 'antxetamedia.herokuapp.com',
                 'antxetamedia.info',
                 'www.antxetamedia.info',
                 'beta.antxetamedia.info',
                 'antxetamedia.eus',
                 'www.antxetamedia.eus']

#########
# Cache #
#########


CACHES = herokuify.get_cache_config()
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'


##########
# Celery #
##########


BROKER_URL = os.environ.get('REDISCLOUD_URL')
CELERY_ALWAYS_EAGER = False
CELERYD_TASK_SOFT_TIME_LIMIT = 500
CELERY_ACCEPT_CONTENT = ['json']
SYNC_BLOBS = True

Exemplo n.º 2
0
ADMINS = [
    # ('Your Name', '*****@*****.**'),
]

# Configure site name and domain
DOMAIN_NAME = "{{ project_name }}.example.net"
SITE_NAME = "{{ project_name|title }}"

DEFAULT_FROM_EMAIL = "{} <hey@{}>".format(SITE_NAME, DOMAIN_NAME)
SERVER_EMAIL = "server@{}".format(DOMAIN_NAME)
EMAIL_SUBJECT_PREFIX = "[{}]".format(SITE_NAME)

# Database and cache settings
DATABASES = herokuify.get_db_config()
CACHES = herokuify.get_cache_config()

# Setup storage for static files and media using S3 Boto backend
DEFAULT_FILE_STORAGE = "herokuify.storage.S3MediaStorage"
STATICFILES_STORAGE = "herokuify.storage.CachedS3StaticStorage"
COMPRESS_STORAGE = "herokuify.storage.CachedS3StaticStorage"

MEDIA_URL = "https://{0}.s3.amazonaws.com/media/".format(
    AWS_STORAGE_BUCKET_NAME)
STATIC_URL = "https://{0}.s3.amazonaws.com/static/".format(
    AWS_STORAGE_BUCKET_NAME)

# Compress assets during deployment
COMPRESS_OFFLINE = True

# Enable caching for templates
Exemplo n.º 3
0
MANAGERS = ADMINS

DATABASES = {
  'default': {
    'ENGINE': 'django.db.backends.sqlite3',
    'NAME': 'demo.db',
    'HOST': '',
    'PORT': '',
    'USER': '',
    'PASSWORD': ''
  }
}

#To set up Heroku caching use the add on MemCachier and input your credentials here
import herokuify
CACHES = herokuify.get_cache_config()   # Memcache config for Memcache/MemCachier

COMPRESS_STORAGE = "herokuify.storage.CachedS3StaticStorage"
COMPRESS_OFFLINE = True
ROBOTS_CACHE_TIMEOUT = 60*60*24

#To set up Amazon S3 media hosting just input your bucket information below

DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
AWS_QUERYSTRING_AUTH = True
AWS_STORAGE_BUCKET_NAME = 'demo-cms-heroku'

STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
S3_URL = 'https://s3.amazonaws.com/demo-cms-heroku/'

TIME_ZONE = 'America/Chicago'
Exemplo n.º 4
0
from celadon.settings.base import *
import dj_database_url
import herokuify

#==============================================================================
# Generic Django project settings
#==============================================================================

DEBUG = env.get("DEBUG", False)
TEMPLATE_DEBUG = DEBUG
ALLOWED_HOSTS = ['*']
HTML_MINIFY = True

DATABASES['default'] = dj_database_url.config()

CACHES = herokuify.get_cache_config(
)  # Memcache config for Memcache/MemCachier
CACHES['dbtemplates'] = CACHES['default']