Her er koden for Studentkjellernes personalforening sitt nåværende nettbaserte system for grovhåndtering av diverse utlån og leier av lokaler, studentansatte, fakturering av medlemsforeninger, samt lønnsrapportering for utbetaling av lønn.
This is the code for the Student basement pubs society current web-based system for roughly managing our various bookings and rentals of our collective premises, student employees, invoicing our member societies, as well as wage reporting to facilitate payroll.
You need Docker and Docker Compose to get started locally. You may use Docker on its own, but it'll require setting the containers up manually.
To get started with a Gunicorn-based development environment with live reloads use
$ docker-compose up
You'll get a local development environment with SPBM, NGINX and PostgreSQL (available at
If you'd rather use the built-in Django development server (at
localhost:8000) you may do so.
$ docker-compose run spbm ./manage.py runserver 0.0.0.0:8000
docker-compose to perform other typical things while developing, such as migrating or loading.
$ docker-compose run spbm ./manage.py showmigrations --plan $ docker-compose run spbm ./manage.py migrate $ docker-compose run spbm ./manage.py loaddata User SpfUser Society Invoice Worker Employment Event NorlonnReport Shift $ docker-compose run spbm ./manage.py ...
You may also use Poetry and a virtualenv for smoother development, but be careful and test your changes using the Docker container too to ensure that everything works the way it should.
Make sure to override default environment variables for SPBM, and PostgreSQL if you're using Docker Compose.
$ docker-compose -f docker-compose.yml -f docker-compose.prod.yml up
Translations and i18n
Make sure to add strings using
ugettextand similarly, such as
ugettext_lazyin models. For more information, see Django's own documentation on how to mark strings as localiseable.
Once strings have been added in the code, extract and combine the strings into the locale's
$ ./manage.py extract && ./manage.py merge
This will extract all the localizable strings into
locale/templates, followed by a merge with
mergeare provided by
Do not use Django's
Once you've translated the strings in
locale/xx_XX/django.po, you'll want to compile the strings. You'll want to do this every time you're working locally and you want to see the changes.
$ ./manage.py compilemessages
Any help is much appreciated. Take a look at our issues in the issue tracker, and go crazy.