Overview
Capture is our front end for managing social media captures. This project will include largely just the front-end django application for this, but there is an entire set of scripts and tools being leveraged behind the scenes that this will communicate with.
-
Create a local database, and, if necessary, a special user
-
local.py settings file:
-
In capture/settings create a local.py
-
Add the following code at the top to import the base settings:
from base import *
-
Generate a new SECRET_KEY. This can be done at: http://www.miniwebtool.com/django-secret-key-generator/
-
Define SECRET_KEY beneath the previous line like so:
SECRET_KEY = '<<code you generated>>'
-
Override any values from base.py as necessary. These include DEBUG, TEMPLATE_DEBUG, and ALLOWED_HOSTS.
-
Add a DATABASE value for your appropriate config. The default sqllite3 version from django 1.7 is:
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } }
This has been removed from base.py to force you to enter a database. Consult the django documentation for information on this
-
Run: python manage.py createsuperuser
-
-
Run the following command:
python manage.py migrate
-
Update the path in capture/wsgi.py
-
Using the django admin, add a
capture_client
with the following permissions:job modification - add
,update - add
,update - modify
.
For Apache and mod_wsgi, you need to enable Passing of the Authorization information. You can do this by adding WSGIPassAuthorization On
for the serversr WSGI configuration. You can read more about this here: http://www.django-rest-framework.org/api-guide/authentication/#apache-mod_wsgi-specific-configuration
I've made several modifications to django to better support dev and production environments. These are detailed below.
manage.py: * changed the config location to point to capture/settings/local.py