Skip to content

Latest commit

 

History

History
73 lines (64 loc) · 2.94 KB

README.md

File metadata and controls

73 lines (64 loc) · 2.94 KB

Django Gulp Boilerplate v0.1

Author: Yan Hong

What's included?

How to setup?

  1. 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
  1. (Optional) Create a virtualenv for your project
  2. Run pip install virtualenv
  3. CD to your project root
  4. Run virtualenv venv
  5. Run source venv/bin/activate
  6. Run pip install -r requirements.txt
  7. Run python manage.py bower install
  8. Install PostgreSQL and create your user and database
  9. Run python manage.py migrate
  10. Install Gulp with npm npm install -g gulp
  11. Install SASS with npm install -g jshint and JShint with npm install -g jshint
  12. Run python manage.py runserver
  13. In another terminal window, run gulp and it should bring up your default browser

Project Structure

  • /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

Question?

Email: [email protected]