Author: Yan Hong
- Django v1.9
- Django base Dockerfile
- Gulp
- Browsersync
- Django Bower
- Open Style UI Framework
- Django Allauth
- Django Avatar
- Raven (for Sentry integration)
- Postgresql connector
- Template structure
- JQuery
- Create a key.py file under project root directory and include following attributes:
# Change the values for your project settings
# Please don't include this file in your repository
# Project names
PROJECT_NAME = 'your_project_name'
# Secret keys
DJANGO_SALT = 'your_secret_keys'
# Database settings, by default, we use postgresql
DB_PASSWORD = 'db_password'
DB_NAME = 'db_name'
DB_USER = 'db_user'
DB_HOST = 'localhost'
DB_PORT = ''
# Debug mode, change it to False in production
DEBUG = True
# Localization settings
LANGUAGE_CODE = 'en-us' # Your language code
TIME_ZONE = 'America/Vancouver' # Your timezone
- (Optional) Create a virtualenv for your project
- Run
pip install virtualenv
- CD to your project root
- Run
virtualenv venv
- Run
source venv/bin/activate
- Run
pip install -r requirements.txt
- Run
python manage.py bower install
- Install PostgreSQL and create your user and database
- Run
python manage.py migrate
- Install Gulp with npm
npm install -g gulp
- Install SASS with
npm install -g jshint
and JShint withnpm install -g jshint
- Run
python manage.py runserver
- In another terminal window, run
gulp
and it should bring up your default browser
- /assets/ Your working static folder
- /img/ Put all your images in this folder
- /js/ Put all your JavaScript in this folder
- /sass/ Put all your SASS stylesheets in this folder
- /static/ Folder generated by Gulp and you should not put static files manually in this folder
- /main/ Django root folder. It contains settings file and homepage view, don't change the folder name
- /templates/ HTML templates with Django templating tags
Email: [email protected]