/Styleguide-Example

Repository for example styleguide project

Primary LanguagePythonMIT LicenseMIT

Styleguide-Example

This project serves as an example of our styleguide

The structure is inspired by cookiecutter-django and modified based on our experience with Django.

Few important things:

  • Linux / Ubuntu is our primary OS and things are tested for that. It will mostly not work on Mac & certainly not work on Windows.
  • It uses Postgres as primary database.
  • It comes with GitHub Actions support, based on that article
  • It comes with whitenoise setup.
  • It can be easily deployed to Heroku.

Helpful commands

To create Postgres database:

sudo -u postgres createdb -O your_postgres_user_here database_name_here

If you want to recreate your database, you can use the bootstrap script:

./scripts/bootstrap.sh your_postgres_user_here

To start Celery:

celery --without-gossip --without-mingle --without-heartbeat worker -A styleguide_example.tasks -l info

To start Celery Beat:

celery -A styleguide_example.tasks beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler

Heroku

The project is ready to be deployed on Heroku. There's a current deployment that can be found - https://hacksoft-styleguide-example.herokuapp.com/