Skip to content

Instantly share code, notes, and snippets.

@andymboyle
Created March 23, 2011 01:56
Show Gist options
  • Save andymboyle/882479 to your computer and use it in GitHub Desktop.
Save andymboyle/882479 to your computer and use it in GitHub Desktop.
Here's your FireTracker settings.py file
# Django settings for firetracker project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Your Name', 'yourname@email.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'firetracker', # Or path to database file if using sqlite3.
'USER': 'boblaw', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
TIME_ZONE = 'America/New_York'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
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
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale
USE_L10N = True
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = ''
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
# HEY this next line? We will add something here in the next step. But for now, you can just leave in this place holder
ADMIN_MEDIA_PREFIX = 'http://s3.amazonaws.com/bucketname/projectname/admin/'
# Make this unique, and don't share it with anybody.
# This shouldn't actually say blah because you should use whatever was originally here
SECRET_KEY = 'blah'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
ROOT_URLCONF = 'firetracker.urls'
TEMPLATE_DIRS = ("/opt/django-projects/firetracker/templates"
# 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.
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin',
'firetracker.fires',
)
# Ignore this next bit, but we will put something here later that you will like
from S3 import CallingFormat
DEFAULT_FILE_STORAGE = 'storages.backends.s3.S3Storage'
AWS_ACCESS_KEY_ID = 'your_access_key_id'
AWS_SECRET_ACCESS_KEY = 'your_secret_access_key'
AWS_STORAGE_BUCKET_NAME = 'andymboyle'
AWS_CALLING_FORMAT = CallingFormat.SUBDOMAIN
AWS_HEADERS = {
'Expires': 'Sat, 15 Apr 2012 20:00:00 GMT',
'Cache-Control': 'max-age=86400',
}
AWS_STORAGE_ACL = 'public-read'
# This next part, if you use gmail, enter in your email at gmail.com and your password
# This way we can send error messages to you and that is so much fun
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'youremail@email.com'
EMAIL_HOST_PASSWORD = 'yourpasswordgoeshere'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment