pyophase is our management application used for organizing an introductory week for new students. Such an introductory week is called Ophase.
Please keep the following things in mind:
- Objects which are relevant for only one Ophase should have a foreign key referring to this Ophase. This allows deleting all data associated to a specific Ophase by removing this single object.
- Create and commit migrations after the database scheme changed (e.g. model changes).
- Recreate, (maybe translate) and commit message files after a string is introduced or changed.
cd changed-app && ../manage.py makemessages
- From time to time, look for new versions of the dependencies, listed in
package.json, test them and commit updated files.
- When new major functionality is introduced, briefly explain it in
A quick development setup is usually easier than a full deployment. Just do the following to get a local instance running.
git clone THIS_REPO cd pyophase virtualenv -p python3 venv source venv/bin/activate pip install -r requirements.txt npm install ./manage.py compilemessages ./manage.py migrate ./manage.py createsuperuser ./manage.py runserver
- Maybe create a user for the WSGI applications (e.g.
- Clone this repository into a proper directory (e.g.
- Create MySQL database and proper user
- Create the file
pyophase/settings_secrets.pyand fill it with the credentials needed in
- Create a virtualenv (e.g.
virtualenv -p python3 venv)
- For serving WSGI applications, one can install
uwsgi, create an ini file under
/etc/uwsgiwith a proper configuration and configure the webserver to use
mod-proxy-uwsgito make the application accessible. The webserver should also serve the static files. Make sure the application server (uwsgi) sets the proper environment variable for production settings (
- Run all the relevant commands from the Updates section
When manually executing
manage.py commands in production, do not forget to either pass the
--settings pyophase.settings_production flag oder set it as an environment variable like
To update an instance of pyophase, one can use the included update script
For production instances, one should use something like
sudo -u pyophase script/update --prod.
A documentation (in German) for users of pyophase is available in
During the organizational work, it is unavoidable to store certain data, some of which is related to individual persons. pyophase is designed in a way such that it is easy to delete all the data after it is no longer needed. The head of Ophase is told to delete this data as early as possible.
Files in pyophase are licensed under the Affero General Public License version 3, the text of which can be found in
LICENSE-AGPL.txt, or any later version of the AGPL, unless otherwise noted.