backend
A Django GraphQL (Graphene) base template
- Make sure your IDE/Editor has Black and EditorConfig plugins installed; and configure it lint file automatically when you edit/save.
- We use Python Poetry to manage depedencies
poetry install
will install all required depedenciespoetry shell
will activate virtualenvpoetry add
to install mypackage from pypipoetry export -f requirements.txt > requirements.txt
to update requirements.txt file before deploying a new feature- Make sure you run
pre-commit install
after the very first clone: https://pre-commit.com/
SQL
CREATE ROLE my_username with encrypted password 'my_password';
ALTER ROLE my_username WITH LOGIN;
CREATE DATABASE my_db_name with owner my_username;
Custom management commands
./manage.py choices_export
will update CHOICES.js and schema.graphql to the latest
Future Updates
- Django 4.0 Upgrade
- Graphene 3 Upgrade (wait for django-graphene to support both Graphne 3 and Django 4)
- User management in keycloak