- Notifications
You must be signed in to change notification settings - Fork3
License
zorzalo3/zorza
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
(/'zɔʐa/ ZAW-zha - Polish foraurora)
An informational website for schools with an advanced timetable interface.
- View class, group, teacher, classroom timetables
- Set a default timetable for easy repeated access
- Find out about upcoming schedule changes, cancelled lessons and teacher substitutions
- Fast experience - minimal use of JavaScript and good caching
- No registration - everything works without user accounts
- Use on any device - fully responsive design
- Check which classrooms are occupied at a given time
- Access school documents and files quickly
- Not astudent information system, but can be complementary to one
- See remaining break time and substitutions also on a publicly installed screen
Install Python 3.5 or later and set up a Python virtual environment, theninstall Django 2.2.28 or later (you can usepip install -r requirements.txt
).
Now you cangit clone
the repository.You will need to create azorza/localsettings.py
file and setDEBUG
,SECRET_KEY
,LANGUAGE_CODE
,TIME_ZONE
.
The root (/
) url is an alias for/pages/home/
, which is aDjango flatpage. Create a flatpage with the URL/home/
in Django administration (/admin/
), otherwise you will get a 404. You have to create an account first with./manage.py createsuperuser
.In the footer there is a link to the flatpage with URL/about/
.
Populating the timetable database should be done by scripts. Thezorza_scripts
repository is a collection of scripts for importing timetables generated by aSc TimeTables and tailoring the database for a specific usecase.
Very basic example timetable and flatpage data can be loaded by./manage.py loaddata fixtures/demo.json
.
For a production setup, consulthttps://docs.djangoproject.com/en/2.2/howto/deployment/checklist/andhttps://docs.djangoproject.com/en/2.2/howto/deployment/.
The directoriesmediafiles
,staticfiles
, and favicons have to be served directly by the web server. Example nginx configuration for that:
location /media {alias /sites/zorza/mediafiles;}location /static {alias /sites/zorza/staticfiles;}location ~ ^/(android|apple-touch-icon|browserconfig|favicon|manifest|safari)(.*)\.(png|xml|ico|json|svg)$ {root /sites/zorza/staticfiles/favicons;}
This software is designed with response caching in mind because the content is mostly static and by nature not requiring urgent updates. SetCACHE_MIDDLEWARE_SECONDS
inlocalsettings.py
and configure your web server for response caching.
The page/timetable/display/
displays remaining break/period time and teacher substitutions. It's intended to be run fullscreen in a browser on a public big screen.Use browser zoom to make it look right.
Custom admin commands (see./manage.py COMMAND --help
):
uploaddir
- uploads a directory of files to a categorycleanup
- removes old substitutions etc.
To access substitution editing forms or the calendar (DayPlan formset) the user needs theadd_substitution
oradd_dayplan
permission respectively.To access Django Adminis_staff
is needed, as is normal with Django.
After timetable changes or group changes in real world, such that teacher/class/group ids saved in the default timetable cookie correspond to a different thing than before, you must increment/add the integerTIMETABLE_VERSION
inlocalsettings.py
. Otherwise you risk default timetables being wrong or 404s.
This project is licensed under AGPLv3.
The header image is a modified photograph bySimo "Ximonic" Räsänen and is available underCC BY-SA 3.0.
The logo font isRaleway.
This project includesmedium-editor by Davi Ferreira (http://www.daviferreira.com) licensed under the MIT license.
See CONTRIBUTING.md