A python/django web-based interface to track the grades, compute the rankings and display a lot of interesting statistics on the International Physicists' Tournament.
- Code: working, v2.0, minor display bugs to fix
- Documentation: work in progress
- CI: None
This image runs standard Django web server.
- Run
docker-compose up
- Open 127.0.0.1:8000/IPTdev/
If you have any web server (for example nginx) on your machine you can use compose-without-nginx.yml. This image uses gunicorn as WSGI server and places ipt_connect.sock
file into ipt_connect
directory. Configure your web server to work with it. You can see configuration example for nginx here. Don't forget to review your project settings, see deployment checklist for more information.
If you haven't any web server you can use compose-nginx.yml. This image runs ipt_connect with nginx and automatically installs Let's Encrypt certificate.
- Open compose-nginx.yml and change things:
- Set timezone to your local, for example
TZ=UTC
. For more timezone values check/usr/share/zoneinfo
directory. LE_EMAIL
should be your email andLE_FQDN
should be your site domain.
- Set timezone to your local, for example
- Replace
www.example.com
in service.conf by your domain. - Don't forget to review your project settings, see deployment checklist for more information.
Not recommended way!
- Install the requirements
pip install -r requirements.txt
- Run
python manage.py runserver
- Open 127.0.0.1:8000/IPTdev/
- Run
python manage.py createsuperuser
- Set username, email address and password.
- Run
python manage.py runserver
- Open 127.0.0.1:8000/admin/ and sign in.
Сhange LANGUAGE_CODE
values in this file to switch the language.
Available values:
- en-us
- ru
Run python manage.py makemessages -a -e=html -i=grappelli/*
Language files are compiled automatically when the server starts.
- Run
python manage.py makemessages -l de -e=html -i=grappelli/*
wherede
is the locale name for the message file you want to create. - Translate all text in the file, which will be create.
- Run application.
- Run
python manage.py flush
- Sign in as superuser and add new participants, jury members and etc.
This command just deletes all the data of current tournament(s). If you want to start a new tournament in adition to existent, read below.
Then you can avoid inserting the participants and jurors by hand.
Log in as superuser and navigate to http://127.0.0.1:8000/IPTdev/upload_csv/.
Select a CSV file and click Upload
.
Note that the format of CSV file is hardcoded in views.py
.
Don't hesitate to adjust it for your needs!
./clone-instance.sh IPTdev IPT2019
IPTdev
is the name of existing instance.
IPT2019
is the name of instance to be created.
Look to the commits being done to see the details.
There are three main parts of the new tournament:
IPT2019
folder with the code- Records in
ipt_connect/urls.py
andipt_connect/settings.py
- Tables in the database
If you are deploying an instance, which you created locally, to the remote server - then you have to do the required steps manually. Just create the instance locally and look at the commits which wil be created.
Notice: this clones only structure of the tournament, i.e. you have an empty table for teams, no registered jurors, etc.