- Python 2.6 (or 2.7)
- Django
- SASS
- MongoDB
- Mongoengine
- Fabric (to automatically deploy to a remote server)
- If running Python 2.6:
We've included a settings_base.py
file to get you started on getting the settings straightened out for your computer. You can create a new settings.py
file that inherits from this one and only overrides the necessary settings.
from mongoengine import connect
connect('coursedata')
DEBUG = True
SECRET_KEY = "Make this secret."
STATIC_ROOT = "/src/static"
# To write to a file
EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
EMAIL_FILE_PATH = '/usr/cddeploy/emails'
The templates for data_app are found in the templates
directory under data_app
. This keeps us from having to specify different template directories in settings.py
for each machine.
Static Files are stored in a static
directory under data_app
. SASS files are stored in the sass
directory under static
and are compiled into the css
directory using the following command while in the static
directory:
sass --watch sass:css
Or, from the main project directory:
sass --watch src/course_data/data_app/static/data_app/sass:src/course_data/data_app/static/data_app/css
SASS files are automatically compiled to CSS files on the server side when using the automatic deployment routine.