This is a Django project that I use for my own personal site. It's really more like a playground. It has a simple Blog model that uses the 3rd party Taggit package. It also uses the flatpages contrib module for personal pages.
For deployment, I use gunicorn with nginx.
To bootstrap the project:
- define the
DJANGO_PROJECT_ENV
environment variable (values: local, dev, uat, prod) - create the virtual environment and activate it
- install third-party packages and this project package
- create the
secrets.py
file - create the database and the tables for all
INSTALLED_APPS
, and create a superuser
echo -e '\n# Django project environment\nexport DJANGO_PROJECT_ENV="local"' >> ~/.profile
source ~/.profile
cd /path/to/virtualenvs
virtualenv misodojo
source misodojo/bin/activate
cd /path/to/misodojo/repository
pip install -r requirements/${DJANGO_PROJECT_ENV}.txt
pip install -e .
mv misodojo/settings/secrets.py.example misodojo/settings/secrets.py
python manage.py migrate
python manage.py createsuperuser
Developer documentation is available in Sphinx format in the docs directory.
Initial installation instructions (including how to build the documentation as HTML) can be found in docs/install.rst.
python manage.py collectstatic -l
python manage.py migrate
python manage.py dumpdata --indent=2 <app_name> > <fixture_name>.json
python manage.py loaddata <fixture_name>
graph_models -a > all_models.dot
graph_models -o <app_name>-models.png <app_name>