This is the official CKC base project, we use this for most of our new clients. It gives us:
❯ One command dev install: make
❯ Heroku deploys for frontend and backend
❯ Email templates + helpers
❯ Fast tests w/coverage (pytest)
❯ Hot reloading for local dev
Use django-admin startproject
to clone skeletor
$ django-admin.py startproject new_project \
--template=https://github.com/ckc-org/skeletor/archive/master.zip \
--name index.md,setup,app.json,README.md
$ cd new_project
Finally, remove this section from the README and continue below!
$ make
# (or make init)
default login is "admin@admin.com" password "admin"
For local development (hot reloading, etc.): http://localhost:3000
To get to the django admin: http://localhost:8000/admin
$ make reset
$ make test
# ..or with coverage:
# docker-compose exec django py.test --cov-report html:artifacts/coverag
# run frontend tests
# docker-compose exec builder yarn test
if you are only doing local development you shouldn't have to do any extra configuration.
for a deployment you'll want to edit .env
with your secrets.
You can use django-extensions to generate a nice diagram of the current model structure.
# make sure graphviz installed
# mac: brew install graphviz
# linux: apt-get install graphviz-dev
# install requisite graph visualizer libs
docker-compose exec django pip install pygraphviz
# take the screenshot
docker-compose exec django ./manage.py graph_models -a -g -o my_project_visualized.png
when we deploy we'll do the following..
requirements.txt
or package.json
/yarn.lock
changes)$ make deploy
eg sending a welcome email....
$ docker-compose exec django ./manage.py email welcome hello@ckcollab.com