- Settings splitted into base/local/production
- Requirements splitted into base/local/production
- Urls splitted into base/local/production
- Fabfile for remote deployment
- Celery for asynchronous tasks
- Common behaviors (mixins) for models
- Common models
- webpack.js for static files handling - JS and SCSS build
- dotenv for environment variables
- Python 3.4.3+
- Django - Python MVC web framework
- Celery - asynchronous queue
- Fabric - deployment and system administration tool
- cookiecutter - command line tool that creates projects from templates
- python-dotenv - convenient environment variables management tool
- webpack.js - module bundler
- npm.js - package manager for javascript
- Mac OS X
- UNIX like OS
git clone git@github.com:artinnok/django-default.git
[sudo] pip install cookiecutter
or
[sudo] easy_install cookiecutter
or on Mac OS X
[sudo] brew install cookiecutter
cookiecutter django-default
After fast installation proccess you receive yoursite_project with structure:
Repository level:
yoursite_project/
├── README.md
├── django-default
└── env
Project level:
yoursite/
├── config
├── core
├── manage.py
├── requirements
└── templates
App level:
core/
├── __init__.py
├── admin.py
├── apps.py
├── behaviors.py
├── common_models.py
├── migrations
├── models.py
└── views.py
[sudo] pip install virtualenv
or
[sudo] easy_install virtualenv
or on Debian and Ubuntu
[sudo] apt-get install virtualenv
cd yoursite_project # repository level
virtualenv -p python3 env
You can generate key via django-extensions:
python manage.py generate_secret_key
Or at this site.
Open in your preferred text editor (vim, nano etc.) file env/bin/activate and prepend to end this part:
export SECRET_KEY='here your generated key'
export DJANGO_SETTINGS_MODULE='config.settings.local'
source env/bin/activate
cd yoursite # project level
pip install -r requirements/local.txt
python manage.py migrate --settings config.settings.local
on Debian and Ubuntu
sudo apt-get install -y build-essential
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
or Mac OS X
[sudo] brew install node
On project level
npm install
webpack
On project level:
python manage.py runserver --settings config.settings.local