-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Note that django-private-media==0.1.3 available on PyPi is not compatible with Django 1.9. However, the same-version-numbered master on github IS Django 1.9 compatible. The workaround: pip uninstall django-private-media pip install git+https://github.com/RacingTadpole/django-private-media.git (see RacingTadpole/django-private-media#9) ALSO, django-private-media is now causing Django 1.10 deprecation warnings.
- Loading branch information
Showing
2 changed files
with
59 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,41 +2,49 @@ | |
Django settings for forthebirds project. | ||
For more information on this file, see | ||
https://docs.djangoproject.com/en/1.6/topics/settings/ | ||
https://docs.djangoproject.com/en/dev/topics/settings/ | ||
For the full list of settings and their values, see | ||
https://docs.djangoproject.com/en/1.6/ref/settings/ | ||
https://docs.djangoproject.com/en/dev/ref/settings/ | ||
""" | ||
|
||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) | ||
|
||
import os | ||
BASE_DIR = os.path.dirname(os.path.dirname(__file__)) | ||
|
||
|
||
# Local configuration | ||
|
||
# Note: I hard-coded the site domain in local_settings in order to | ||
# use it in the podcast feed. For some reason, while Django does prefix | ||
# the feed-wide url and feed item page urls with the domain name, | ||
# it is does not add this prefix to the enclosure mp3 url. Since | ||
# iTunes requires the domain name in the enclosure url, I need to add | ||
# it myself. And since the request object is not accessible when | ||
# extending a Feed object, I have it in this settings file. | ||
# | ||
# I opted not to use the Sites framework for this since it does not | ||
# seem to be the intention of the Sites framework. | ||
# | ||
from local_settings import (DEBUG, SECRET_KEY, DATABASES, | ||
SITE_DOMAIN, OLD_SITE_DOMAIN, | ||
ITUNES_SUBSCRIBE_LINK, PERMANENT_REDIRECTS, | ||
STATIC_ROOT, MEDIA_ROOT, | ||
PRIVATE_MEDIA_ROOT, PRIVATE_MEDIA_SERVER) | ||
|
||
TEMPLATE_DEBUG = DEBUG | ||
from local_settings import ( | ||
DEBUG, SECRET_KEY, DATABASES, SITE_DOMAIN, OLD_SITE_DOMAIN, | ||
ITUNES_SUBSCRIBE_LINK, PERMANENT_REDIRECTS, | ||
STATIC_ROOT, MEDIA_ROOT, PRIVATE_MEDIA_ROOT, PRIVATE_MEDIA_SERVER) | ||
|
||
|
||
# Security | ||
|
||
ALLOWED_HOSTS = ['*'] | ||
|
||
|
||
# Administration | ||
|
||
ADMINS = [('Katherine Erickson', '[email protected]'),] | ||
|
||
|
||
# Application definition | ||
INSTALLED_APPS = ( | ||
|
||
INSTALLED_APPS = [ | ||
'django.contrib.admin', | ||
'django.contrib.auth', | ||
'django.contrib.contenttypes', | ||
|
@@ -54,7 +62,7 @@ | |
'birds', | ||
'creations', | ||
'waystohelp', | ||
) | ||
] | ||
|
||
MIDDLEWARE_CLASSES = ( | ||
'django.contrib.sessions.middleware.SessionMiddleware', | ||
|
@@ -71,43 +79,63 @@ | |
|
||
|
||
# Internationalization | ||
# https://docs.djangoproject.com/en/dev/topics/i18n/ | ||
|
||
LANGUAGE_CODE = 'en-us' | ||
|
||
TIME_ZONE = 'America/New_York' | ||
|
||
USE_I18N = True | ||
|
||
USE_L10N = True | ||
USE_L10N = False | ||
|
||
USE_TZ = True | ||
|
||
|
||
# Static files (CSS, JavaScript, Images) | ||
# Static and Media files | ||
# https://docs.djangoproject.com/en/dev/howto/static-files/ | ||
|
||
STATIC_URL = '/static/' | ||
|
||
# Media files (User-uploaded files) | ||
MEDIA_URL = '/media/' | ||
|
||
# Private media files | ||
PRIVATE_MEDIA_URL = '/private-media/' | ||
|
||
# For request object in templates | ||
from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS as TCP | ||
TEMPLATE_CONTEXT_PROCESSORS = TCP + ( | ||
'django.core.context_processors.request', | ||
'django.contrib.messages.context_processors.messages', | ||
) | ||
|
||
# Needed so overridden admin templates take precedence | ||
TEMPLATE_DIRS = ( | ||
BASE_DIR + '/website/templates/', | ||
) | ||
# Templates | ||
|
||
TEMPLATES = [ | ||
{ | ||
'BACKEND': 'django.template.backends.django.DjangoTemplates', | ||
'APP_DIRS': True, | ||
|
||
# Needed so overrideen admin templates take precedence | ||
'DIRS': [BASE_DIR + '/website/templates/'], | ||
|
||
'OPTIONS': { | ||
# Needed to provide request object in templates | ||
'context_processors': [ | ||
'django.contrib.auth.context_processors.auth', | ||
'django.template.context_processors.debug', | ||
'django.template.context_processors.i18n', | ||
'django.template.context_processors.media', | ||
'django.template.context_processors.static', | ||
'django.template.context_processors.tz', | ||
'django.contrib.messages.context_processors.messages', | ||
'django.template.context_processors.request', | ||
], | ||
}, | ||
}, | ||
] | ||
|
||
|
||
# Login | ||
|
||
# Authentication | ||
LOGIN_URL = 'login_url' | ||
LOGIN_REDIRECT_URL = 'home_url' | ||
|
||
# Constants | ||
|
||
# Miscellany | ||
|
||
MARKDOWN_PROMPT = ( | ||
'Use Markdown syntax for italics, bullets, etc. See ' | ||
'<a href="http://www.darkcoding.net/software/markdown-quick-reference">' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters