A Django app for editing/testing puzzles for a puzzlehunt. Puzzletron reincarnate.
Primarily maintained by @betaveros. Lots of infrastructure by @mitchgu. Many contributions from @jakob223, @dvorak42, and @fortenforge.
Contains a lightly modified copy of sorttable.js, licensed under the X11 license.
When putting up PRs, please label them appropriately so that release notes can be automatically drafted:
To release, go to the 'Releases' page, edit the current draft, and publish it. This will instruct the droplet to pull the latest changes from master. If there are any actions that need to be taken (server restart, new settings) please flag in #sha-tech.
pip3
(maybe pip
) and python 3.x.pip3 install virtualenv
cd
into the root of this repovirtualenv venv --python python3
.
venv
without polluting your computer's global packages--python python3
.python -m virtualenv venv
instead if you don't want to do that.source venv/bin/activate
venv/bin/activate.csh
or venv/bin/activate.fish
if you're using csh or fishvenv\Scripts\activate
on Windows.pip3 install -r requirements.txt
fatal error: Python.h: No such file or directory
? Try installing python-dev
libraries first (e.g. sudo apt-get install python-dev
).Fix all the configuration options, secret keys and credentials:
Create a .env
file at the root of the repository with the following:
SECRET_KEY=FIX_ME
SITE_PASSWORD=FIX_ME
DEBUG=true
EMAIL_HOST_USER=FIX_ME
EMAIL_HOST_PASSWORD=FIX_ME
settings/staging.py
and settings/prod.py
python manage.py migrate
python manage.py createsuperuser
pre-commit install
(may need to pip3 install pre-commit
first)python manage.py runserver
python manage.py migrate
If all went well, the dev server should start, the local IP and port should be printed to stdout, and it should helpfully tell you you're running Django 2.2.4.
Later, when you're done working on the project and want to leave the virtualenv,
run deactivate
.
If you ever need to install more pip packages for this project, make sure you've
activated the virtualenv first. Then add the dependency to requirements.txt
.
python version
starts with 2, you might need to install python 3, or to swap python
to python3
at the beginning of your commands.manage.py
python manage.py --help
to get a list of subcommands/admin
page locally) run python manage.py createsuperuser
python manage.py migrate
python manage.py runserver --settings=settings.prod --insecure
--insecure
uses django's built in static files server, which is enough for our purposes.The root of this repository is the Django project
Site-wide configuration lives inside the gph
directory.
The Django project (currently) has only one app, called "puzzle_editing". Most
business logic and UI lives inside the puzzle_editing
directory.
Static files (CSS etc.) live in puzzle_editing/static
.
Some goals and consequences of Puzzlord's design:
Some features are still missing.