Our website's backend has been renewed in 2024, because no one wanted to touch Node.js anymore.
You can still access the legacy repository.
We handle the configuration by using toml. If not provided, it uses default values. Optionally, you can set any of the followings in your configuration.
PORT = "31415"
SECRET_KEY = "unbowed-unbent-unbroken"
MATRIX_ADMIN_ROOM = "<your matrix room link>"
MATRIX_ACCESS_TOKEN = "<your matrix access token>"
DEBUG = true
ALLOWED_HOSTS = ["*"]
CSRF_TRUSTED_ORIGINS = []
DATABASE_NAME = "./oytwebsite/db.sqlite3"
STATIC_URL = "static/"
MEDIA_URL = "media/"
MEDIA_ROOT = "./oytwebsite/media"
A virtual environment is optional, but highly recommended:
python3 -m venv venv && source venv/bin/activate
You can install required python packages directly from requirements.txt
.
pip install -r requirements.txt
Create needed database tables first. You don't need to call makemigrations
, but it's a good idea to run it just in
case. Actually, if you are not going to work with the database, then you can even skip this step, but
not recommended.
CONFIG_FILE=/path/to/your/config.toml python oytwebsite/manage.py makemigrations
CONFIG_FILE=/path/to/your/config.toml python oytwebsite/manage.py migrate
CONFIG_FILE=/path/to/your/config.toml python oytwebsite/manage.py runserver
or
PYTHONPATH=oytwebsite django-admin runserver --settings=oytwebsite.settings
If you have a different settings.py
.
Any type of contribution is appreciated! Consider opening an issue first, if you are planning to add a brand-new future.