New Zealand huts, campsites and more.
/\
/\ //\\
/\ //\\///\\\ /\
//\\ ///\////\\\\ /\ //\\
/\ / ^ \/^ ^/^ ^ ^ \/^ \/ ^ \
/ ^\ /\ / ^ / ^/ ^ ^ ^ ^\ ^/ ^^ \
/^ \ / ^\/ ^ ^ ^ / ^ ^ ^ \/ ^ ^ \ *
/ ^ ^ \/^ ^\ ^ ^ ^ ^ ^ ^ ____ ^ ^ \ /|\
/ ^ ^ ^ \ ^ _\___________________| |_____^ ^ \ /||o\
/ ^^ ^ ^ ^\ /______________________________\ ^ ^ \ /|o|||\
/ ^ ^^ ^ ^ /________________________________\ ^ /|||||o|\
/^ ^ ^ ^^ ^ ||___|___||||||||||||___|__||| /||o||||||\ |
/ ^ ^ ^ ^ ||___|___||||||||||||___|__||| | | |
/ ^ ^ ^ ^ ^ ^ ||||||||||||||||||||||||||||||oooooooooo| |ooooooo |
ooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
Build the environment:
$ docker-compose -f local.yml build
Start:
$ docker-compose -f local.yml up
More tips at http://cookiecutter-django.readthedocs.io/en/latest/developing-locally-docker.html
http://cookiecutter-django.readthedocs.io/en/latest/settings.html
-
To create an superuser account, use this command:
$ docker-compose -f local.yml run django python manage.py createsuperuser
For convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users.
$ docker exec -t -i {django container ID} /bin/bash
$ python manage.py shell --settings=config.settings.local
$ from nzhuts.taskapp.tasks import *;fetch_all_huts.delay()
$ docker-compose -f local.yml rm --all
To run the tests, check your test coverage, and generate an HTML coverage report:
$ coverage run manage.py test
$ coverage html
$ open htmlcov/index.html
$ py.test
http://cookiecutter-django.readthedocs.io/en/latest/live-reloading-and-sass-compilation.html
This app comes with Celery.
To run a celery worker:
$ cd nzhuts
$ celery -A nzhuts.taskapp worker -l info
Please note: For Celery's import magic to work, it is important where the celery commands are run. If you are in the same folder with manage.py, you should be right.
The following details how to deploy this application.
http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html