This Django app provides an API for signalstickers.org to use, as well as a
control panel to manage packs.
⚠️ Do not open Pull Requests without asking before.⚠️
I'm not looking for new features at the moment, as this is an "internal tool" for the moderation/admin team.
Install the pipenv (make venv), and open a pipenv shell (pipenv shell).
You'll then be able to use signalstickers/manage.py (e.g.
./signalstickers/manage.py runserver).
- Run tests:
pipenv run test - Run lint:
pipenv run lint - Run bandit:
pipenv run sec - Run the 3 above:
pipenv run check(run it before commiting, as this is run by Github) - Update
requirements.txt:pipenv lock -r > requirements.txt
We use Docker containers for postgres. An adminer container is available to
browse the DB from a web browser at http://localhost:9988 (with autologin).
sudo docker-compose up -d
sudo docker-compose down
sudo docker-compose down # If needed
sudo rm -rf .pgdata # Remove the data directory of postgres
sudo docker-compose up --force-recreate -d # Rebuild the containers and start them
- Create an admin account:
./signalstickers/manage.py createsuperuser; - Import some stickers: copy/paste some stickers from the old YML
format,
save them in a file, and import them:
./signalstickers/manage.py import_from_yml path/to/file.yml. We recommend that you import only ~20, as this process is slow; - Start the dev server with
./signalstickers/manage.py runserver; - Navigate to
http://localhost:<PORT>/adminand log in.
Copy signalstickers/settings/prod.py.dist to signalstickers/settings/prod.py
and edit values.
Romain RICARD contact+sstbackend at romainricard.fr