This is the main application for GCHQ.NET - Great Camp Hexpansion Quest
This project is based on Django and uses Parcel to bundle frontend assets.
You will need Python 3.11 or later, Poetry and Node.JS 20 or NVM. You should also install GNU Make if it is not already available on your system.
Firstly, if you are using NVM, set the correct Node version: nvm use 20
and then install the Node dependencies: npm install
The frontend assets can then be built using npm run start
and will automatically update them as you change code.
Firstly, install the Python dependencies using poetry: poetry install
.
You can enter the virtualenv by running poetry shell
or run commands using poetry run <cmd>
.
For development, we are using sqlite at the moment. You can create the sqlite database by running ./manage.py migrate
A superuser can be created by running ./manage.py createsuperuser
You can run the Django development server: ./manage.py runserver
or make dev
All automatic tests can be run by invoking Make: make
The following commands are also available:
make check
- run Django automated checksmake dev
- run Django's development servermake format
- format python code and templatesmake format-check
- check that code is formatted correctlymake lint
- lint python codemake lint-fix
- lint python code and fix any errors where possiblemake type
- run the type checkermake test
- run the Django unit test suitemake test-cov
- run the Django unit test suite and output a directory of test coverage infoWhen deploying to production, the Django deployment guidelines should be followed.
Additionally, you will need to build the minified frontend assets for production: npm run build
before running ./manage.py collectstatic