Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • konstantin/akplanning
  • matedealer/akplanning
  • kif/akplanning
  • mirco/akplanning
  • lordofthevoid/akplanning
  • voidptr/akplanning
  • xayomer/akplanning-fork
  • mollux/akplanning
  • neumantm/akplanning
  • mmarx/akplanning
  • nerf/akplanning
  • felix_bonn/akplanning
  • sebastian.uschmann/akplanning
13 results
Show changes
......@@ -14,4 +14,6 @@ AKPlanning is currently being maintained by:
Further contributions in the form of code, testing, documentation etc. were made by:
*
* R. Zameitat [xayomer](https://gitlab.fachschaften.org/xayomer)
* N. Steinger [voidptr](https://gitlab.fachschaften.org/voidptr)
* T. Neumann [neumantm](https://gitlab.fachschaften.org/neumantm)
FROM python:3-alpine
RUN apk add --no-cache gcc python3-dev musl-dev libffi-dev mariadb-connector-c-dev gettext
ADD . /app
WORKDIR /app
RUN pip install -r requirements.txt -r .docker/extra_requirements.txt
ENV DJANGO_SETTINGS_MODULE=AKPlanning.settings_production
RUN mkdir /app/AKPlanning/settings
EXPOSE 3035
CMD ["sh", "/app/.docker/entrypoint.sh"]
# AK Planning: Setup
This repository contains a Django project with several apps.
## Requirements
AKPlanning has two types of requirements: System requirements are dependent on operating system and need to be installed
manually beforehand. Python requirements will be installed inside a virtual environment (strongly recommended) during
setup.
### System Requirements
* Python3.11+ incl. development tools
* Virtualenv
* pdflatex & beamer
class (`texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-extra texlive-luatex`)
* for production using uwsgi:
* C compiler e.g. gcc
* uwsgi
* uwsgi Python3 plugin
* for production using Apache (in addition to uwsgi)
* the mod proxy uwsgi plugin for apache2
### Python Requirements
Python requirements are listed in ``requirements.txt``. They can be installed with pip using ``-r requirements.txt``.
## Development Setup
* create a new directory that should contain the files in future, e.g. ``mkdir AKPlanning``
* change into that directory ``cd AKPlanning``
* clone this repository ``git clone URL .``
### Automatic Setup
1. execute the setup bash script ``Utils/setup.sh``
### Manual Setup
1. setup a virtual environment using the proper python version ``virtualenv venv -p python3.7``
1. activate virtualenv ``source venv/bin/activate``
1. install python requirements ``pip install -r requirements.txt``
1. setup necessary database tables etc. ``python manage.py migrate``
1. prepare static files (can be omitted for dev setups) ``python manage.py collectstatic``
1. compile translations ``python manage.py compilemessages``
1. create a priviledged user, credentials are entered interactively on CLI ``python manage.py createsuperuser``
1. deactivate virtualenv ``deactivate``
### Development Server
**Do not use this for deployment!**
To start the application for development, in the root directory,
1. activate virtualenv ``source venv/bin/activate``
1. start development server ``python manage.py runserver 0:8000``
1. In your browser, access ``http://127.0.0.1:8000/admin/`` and continue from there.
## Deployment Setup
This application can be deployed using a web server as any other Django application. Remember to use a secret key that
is not stored in any repository or similar, and disable DEBUG mode (``settings.py``).
**Step-by-Step Instructions**
1. log into your system with a sudo user
1. install system requirements
1. create a folder, e.g. ``mkdir /srv/AKPlanning/``
1. change to the new directory ``cd /srv/AKPlanning/``
1. clone this repository ``git clone URL .``
1. setup a virtual environment using the proper python version ``virtualenv venv -p python3.7``
1. activate virtualenv ``source venv/bin/activate``
1. update tools ``pip install --upgrade setuptools pip wheel``
1. install python requirements ``pip install -r requirements.txt``
1. create the file ``AKPlanning/settings_secrets.py`` (copy from ``settings_secrets.py.sample``) and fill it with the
necessary secrets (e.g. generated by ``tr -dc 'a-z0-9!@#$%^&*(-_=+)' < /dev/urandom | head -c50``) (it is a good idea
to restrict read permissions from others)
1. if necessary enable uwsgi proxy plugin for Apache e.g.``a2enmod proxy_uwsgi``
1. edit the apache config to serve the application and the static files, e.g. on a dedicated system
in ``/etc/apache2/sites-enabled/000-default.conf`` within the ``VirtualHost`` tag add:
```
Alias /static /srv/AKPlanning/static
<Directory /srv/AKPlanning/static>
Require all granted
</Directory>
ProxyPassMatch ^/static/ !
ProxyPass / uwsgi://127.0.0.1:3035/
```
or create a new config (.conf) file (similar to ``apache-akplanning.conf``) replacing $SUBDOMAIN with the subdomain
the system should be available under, and $MAILADDRESS with the e-mail address of your administrator and $PATHTO with
the appropriate paths. Copy or symlink it to ``/etc/apache2/sites-available``. Then symlink it to ``sites-enabled``
e.g. by using ``ln -s /etc/apache2/sites-available/akplanning.conf /etc/apache2/sites-enabled/akplanning.conf``.
1. restart Apache ``sudo systemctl restart apache2.service``
1. create a dedicated user, e.g. ``adduser django``
1. transfer ownership of the folder to the new user ``chown -R django:django /srv/AKPlanning``
1. Copy or symlink the uwsgi config in ``uwsgi-akplanning.ini`` to ``/etc/uwsgi/apps-available/`` and then symlink it
to ``/etc/uwsgi/apps-enabled/`` using
e.g., ``ln -s /srv/AKPlanning/uwsgi-akplanning.ini /etc/uwsgi/apps-available/akplanning.ini``
and ``ln -s /etc/uwsgi/apps-available/akplanning.ini /etc/uwsgi/apps-enabled/akplanning.ini``
start uwsgi using the configuration file ``uwsgi --ini uwsgi-akplanning.ini``
1. restart uwsgi ``sudo systemctl restart uwsgi``
1. execute the update script ``./Utils/update.sh --prod``
## Deployment Setup using Docker
This project also provides a docker file for easy deployment.
The container described by the docker file only contains the project itself.
Additional containers for the database and webserver are needed to use it.
The following [docker-compose](https://docs.docker.com/compose/) file shows a typical usage:
```
version: "3"
networks:
akplanning:
external: false
volumes:
static-files:
services:
mariadb:
image: mariadb:10
restart: always
environment:
MYSQL_ROOT_PASSWORD: supermegasecrey
MYSQL_DATABASE: akplanning
MYSQL_USER: akplanning
MYSQL_PASSWORD: secret
TZ: Europe/Berlin
networks:
- akplanning
akplanning-server:
image: neumantm/akplanning:2021-03-10
restart: always
environment:
SECRET_KEY: superlongandsupersecret
DB_HOST: mariadb
DB_USER: akplanning
DB_NAME: akplanning
DB_PASSWORD: secret
HOSTS: "['akplanning.example.net', 'akplanning.example.de']"
TZ: Europe/Berlin
AUTO_MIGRATE_DB: 'true'
DJANGO_SUPERUSER_USERNAME: admin
DJANGO_SUPERUSER_EMAIL: admin@example.com
DJANGO_SUPERUSER_PASSWORD: supersecret
EXTRA_DJANGO_SETTING_FOO: DJANGO_FOO = True\nDJANGO_BAR = False
depends_on:
- mariadb
networks:
- akplanning
volumes:
- static-files:/app/static
web-server:
image: nginx
restart: always
volumes:
- /path/to/nginx.conf:/etc/nginx/nginx.conf:ro
- static-files:/var/www/akplanning-static
ports:
- "8080:80"
depends_on:
- akplanning-server
networks:
- akplanning
```
The `nginx.conf` would look like this:
```
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost:8080;
location /static/ {
alias /var/www/akplanning-static/;
}
location / {
include /etc/nginx/uwsgi_params;
uwsgi_pass uwsgi://akplanning-server:3035;
}
}
}
```
### Initializing and migrating database
On the first start, the database must be initialized (the Tables created and so on).
When updating the project the database must be migrated.
Both are done using the `migrate` command.
This can be done manually by running the following command after the container has started:
`docker-compose exec -it akplanning-server ./manage.py migrate`
It can also be done automatically on each container start by setting `AUTO_MIGRATE_DB` to the string `true`
(as shown in the docker-compose file above).
Database migration may lead to the corruption or loss of data in some cases.
Make sure you have a backup before running the command and be very careful with enabling auto migration.
### Creating initial superuser
There are two ways to create the initial superuser when using the docker container.
For both the database must have been intialized before.
The first way is already shown in the docker-compose file above:
Using the environment variables `DJANGO_SUPERUSER_{USERNAME,EMAIL,PASSWORD}`.
The second way is to run the following command after the container has started:
`docker-compose exec -it akplanning-server ./manage.py createsuperuser`
### Extra django settings
For simple cases you can pass environment variables starting with `EXTRA_DJANGO_SETTING`.
The content of such variables is written into python files, which are loaded as settings.
For more complex scenarios you can also mount a docker volume to `/app/AKPlanning/settings` and add any number of python files to the volume.
## Updates
To update the setup to the current version on the main branch of the repository use the update
script ``Utils/update.sh`` or ``Utils/update.sh --prod`` in production.
Afterwards, you may check your setup by executing ``Utils/check.sh`` or ``Utils/check.sh --prod`` in production.
### Updating when using docker
To update when using docker, just switch the tag of the image for `akplanning-server`.
Then (if `AUTO_MIGRATE_DB` is not enabled), do a database migration as described in [Initializing and migrating database](#initializing-and-migrating-database)
......@@ -7,118 +7,28 @@ AKPlanning is a tool used for modeling, submitting, scheduling and displaying AK
It was built for KIF (German: Konferenz der deutschsprachigen Informatikfachschaften), refer to [the wiki](wiki.kif.rocks) for more Information.
## Setup
This repository contains a Django project with several apps.
### Requirements
AKPlanning has two types of requirements: System requirements are dependent on operating system and need to be installed manually beforehand. Python requirements will be installed inside a virtual environment (strongly recommended) during setup.
#### System Requirements
* Python 3.7 incl. development tools
* Virtualenv
* for production using uwsgi:
* C compiler e.g. gcc
* uwsgi
* uwsgi Python3 plugin
* for production using Apache (in addition to uwsgi)
* the mod proxy uwsgi plugin for apache2
#### Python Requirements
Python requirements are listed in ``requirements.txt``. They can be installed with pip using ``-r requirements.txt``.
### Development Setup
* create a new directory that should contain the files in future, e.g. ``mkdir AKPlanning``
* change into that directory ``cd AKPlanning``
* clone this repository ``git clone URL .``
**Automatic Setup**
1. execute the setup bash script ``Utils/setup.sh``
**Manual Setup**
1. setup a virtual environment using the proper python version ``virtualenv venv -p python3.7``
1. activate virtualenv ``source venv/bin/activate``
1. install python requirements ``pip install -r requirements.txt``
1. setup necessary database tables etc. ``python manage.py migrate``
1. prepare static files (can be omitted for dev setups) ``python manage.py collectstatic``
1. compile translations ``python manage.py compilemessages``
1. create a priviledged user, credentials are entered interactively on CLI ``python manage.py createsuperuser``
1. deactivate virtualenv ``deactivate``
**Development Server**
To start the application for development use ``python manage.py runserver 0:8000`` from the root directory.
*Do not use this for deployment!*
In your browser, access ``http://127.0.0.1:8000/`` and continue from there.
### Deployment Setup
This application can be deployed using a web server as any other Django application.
Remember to use a secret key that is not stored in any repository or similar, and disable DEBUG mode (``settings.py``).
**Step-by-Step Instructions**
1. log into your system with a sudo user
1. install system requirements
1. create a folder, e.g. ``mkdir /srv/AKPlanning/``
1. change to the new directory ``cd /srv/AKPlanning/``
1. clone this repository ``git clone URL .``
1. setup a virtual environment using the proper python version ``virtualenv venv -p python3.7``
1. activate virtualenv ``source venv/bin/activate``
1. update tools ``pip install --upgrade setuptools pip wheel``
1. install python requirements ``pip install -r requirements.txt``
1. create the file ``AKPlanning/settings_secrets.py`` (copy from ``settings_secrets.py.sample``) and fill it with the necessary secrets (e.g. generated by ``tr -dc 'a-z0-9!@#$%^&*(-_=+)' < /dev/urandom | head -c50``) (it is a good idea to restrict read permissions from others)
1. if necessary enable uwsgi proxy plugin for Apache e.g.``a2enmod proxy_uwsgi``
1. edit the apache config to serve the application and the static files, e.g. on a dedicated system in ``/etc/apache2/sites-enabled/000-default.conf`` within the ``VirtualHost`` tag add:
## Structure
```
Alias /static /srv/AKPlanning/static
<Directory /srv/AKPlanning/static>
Require all granted
</Directory>
This repository contains a Django project called AKPlanning. The functionality is encapsulated into Django apps:
ProxyPassMatch ^/static/ !
ProxyPass / uwsgi://127.0.0.1:3035/
```
1. **AKModel**: This app contains the general Django models used to represent events, users, rooms, scheduling constraints etc. This app is a basic requirements for the other apps. Data Import/Export also goes here.
1. **AKDashboard**: This app provides a landing page for the project. Per Event it provides links to all relevant functionalities and views.
1. **AKSubmission**: This app provides forms to submit all kinds of AKs, edit or delete them, as well as a list of all submitted AKs for an event.
1. **AKScheduling**: This app allows organizers to schedule AKs, i.e. assigning rooms, slots, etc. It marks conflicts of all modeled constraints and assists in creating a suitable schedule.
1. **AKPlan**: This app displays AKs and where/when they will take place for each event. Views are optimised according to usage/purpose.
or create a new config (.conf) file (similar to ``apache-akplanning.conf``) replacing $SUBDOMAIN with the subdomain the system should be available under, and $MAILADDRESS with the e-mail address of your administrator and $PATHTO with the appropriate paths. Copy or symlink it to ``/etc/apache2/sites-available``. Then symlink it to ``sites-enabled`` e.g. by using ``ln -s /etc/apache2/sites-available/akplanning.conf /etc/apache2/sites-enabled/akplanning.conf``.
1. restart Apache ``sudo systemctl restart apache2.service``
1. create a dedicated user, e.g. ``adduser django``
1. transfer ownership of the folder to the new user ``chown -R django:django /srv/WannaDB``
1. Copy or symlink the uwsgi config in ``uwsgi-akplanning.ini`` to ``/etc/uwsgi/apps-available/`` and then symlink it to ``/etc/uwsgi/apps-enabled/`` using e.g., ``ln -s /srv/AKPlanning/uwsgi-akplanning.ini /etc/uwsgi/apps-available/akplanning.ini`` and ``ln -s /etc/uwsgi/apps-available/akplanning.ini /etc/uwsgi/apps-enabled/akplanning.ini``
start uwsgi using the configuration file ``uwsgi --ini uwsgi-akplanning.ini``
1. restart uwsgi ``sudo systemctl restart uwsgi``
1. execute the update script ``./Utils/update.sh --prod``
## Setup instructions
### Updates
See [INSTALL.md](INSTALL.md) for detailed instructions on development and production setups.
To update the setup to the current version on the main branch of the repository use the update script ``Utils/update.sh`` or ``Utils/update.sh --prod`` in production.
Afterwards, you may check your setup by executing ``Utils/check.sh`` or ``Utils/check.sh --prod`` in production.
## Structure
This repository contains a Django project called AKPlanning. The functionality is encapsulated into Django apps:
1. **AKModel**: This app contains the general Django models used to represent events, users, rooms, scheduling constraints etc. This app is a basic requirements for the other apps. Data Import/Export also goes here.
1. **AKDashboard**: This app provides a landing page for the project. Per Event it provides links to all relevant functionalities and views.
1. **AKSubmission**: This app provides forms to submit all kinds of AKs, edit or delete them, as well as a list of all submitted AKs for an event.
1. **AKScheduling**: This app allows organizers to schedule AKs, i.e. assigning rooms, slots, etc. It marks conflicts of all modeled constraints and assists in creating a suitable schedule.
1. **AKPlan**: This app displays AKs and where/when they will take place for each event. Views are optimised according to usage/purpose.
## Developer Notes
* to regenerate translations use ````python manage.py makemessages -l de_DE --ignore venv````
* to create a data backup use ````python manage.py dumpdata --indent=2 > db.json --traceback````
* to export all database items belonging to a certain event use ````./Utils/json_export.sh <event_id> <export_prefix> [--prod]````. The results will be saved in ````backups/<export_prefix>.json````
......@@ -7,3 +7,4 @@ All scripts should be executed from the project folder (repository root).
* **setup** installation script for development setup
* **update** update script for development or production (--prod) setup
* **check** setup checking script for development and production (--prod) setup
* **json_export** export script for development and production (--prod) -- can be used to export all database items belonging to a given event
\ No newline at end of file
......@@ -8,14 +8,21 @@ if [ -z ${VIRTUAL_ENV+x} ]; then
fi
# enable really all warnings, some of them are silenced by default
if [[ "$@" == *"--all"* ]]; then
export PYTHONWARNINGS=all
fi
for arg in "$@"; do
if [[ "$arg" == "--all" ]]; then
export PYTHONWARNINGS=all
fi
done
# in case of checking production setup
if [[ "$@" == *"--prod"* ]]; then
export DJANGO_SETTINGS_MODULE=AKPlanning.settings_production
./manage.py check --deploy
fi
for arg in "$@"; do
if [[ "$arg" == "--prod" ]]; then
export DJANGO_SETTINGS_MODULE=AKPlanning.settings_production
./manage.py check --deploy
./manage.py makemigrations --dry-run --check
fi
done
# check the setup
./manage.py check
./manage.py makemigrations --dry-run --check
import json
import sys
event_id = int(sys.argv[1])
target_name = sys.argv[2]
print(f"Creating export for event '{event_id}' as '{target_name}'")
# Load json file just created by django
with open('backups/akplanning_only.json', 'r') as json_file:
exported_entries = json.load(json_file)
print(f"Loaded {len(exported_entries)} entries in total, restricting to event...")
entries_without_event = 0
entries_out = []
virtual_rooms_to_preserve = set()
# Loop over all dumped entries
for entry in exported_entries:
# Handle all entries with event reference
if "event" in entry['fields']:
event = int(entry['fields']['event'])
# Does this entry belong to the event we are looking for?
if event == event_id:
# Store for backup
entries_out.append(entry)
# Remember the primary keys of all rooms of this event
# Required for special handling of virtual rooms,
# since they inherit from normal rooms and have no direct event reference
if entry['model'] == "AKModel.room":
virtual_rooms_to_preserve.add(entry['pk'])
# Handle entries without event reference
else:
# Backup virtual rooms of that event
if entry['model'] == "AKOnline.virtualroom":
if entry['pk'] in virtual_rooms_to_preserve:
entries_out.append(entry)
# Backup the event itself
elif entry['model'] == "AKModel.event":
if int(entry['pk']) == event_id:
entries_out.append(entry)
else:
# This should normally not happen (all other models should have a reference to the event)
entries_without_event += 1
print(entry)
print(f"Ignored entries without event: {entries_without_event}")
print(f"Exporting {len(entries_out)} entries for event")
with open(f'backups/{target_name}.json', 'w') as json_file:
json.dump(entries_out, json_file, indent=2)
#!/usr/bin/env bash
# Update AKPlanning
# execute as Utils/update.sh id_to_export target_name_to_export_to [--prod]
# abort on error, print executed commands
set -ex
# activate virtualenv if necessary
if [ -z ${VIRTUAL_ENV+x} ]; then
source venv/bin/activate
fi
# set environment variable when we want to update in production
if [ "$3" = "--prod" ]; then
export DJANGO_SETTINGS_MODULE=AKPlanning.settings_production
fi
mkdir -p ../backups/
python manage.py dumpdata AKDashboard AKModel AKOnline AKPlan AKScheduling AKSubmission --indent=2 > "backups/akplanning_only.json" --traceback
python ./Utils/json_export.py $1 $2
rm backups/akplanning_only.json
#!/usr/bin/env bash
# Setup AKPlanning
# execute as Utils/check.sh
# execute as Utils/setup.sh
# abort on error, print executed commands
set -ex
......@@ -10,20 +10,36 @@ rm -rf venv/
# Setup Python Environment
# Requires: Virtualenv, appropriate Python installation
virtualenv venv -p python3.7
virtualenv venv -p python3.11
source venv/bin/activate
pip install --upgrade setuptools pip wheel
pip install -r requirements.txt
# set environment variable when we want to update in production
if [ "$1" = "--prod" ]; then
export DJANGO_SETTINGS_MODULE=AKPlanning.settings_production
fi
if [ "$1" = "--ci" ]; then
export DJANGO_SETTINGS_MODULE=AKPlanning.settings_ci
fi
# Setup database
python manage.py migrate
# Prepare static files and translations
python manage.py collectstatic --noinput
python manage.py compilemessages
python manage.py compilemessages -l de_DE
# Create superuser
# Credentials are entered interactively on CLI
python manage.py createsuperuser
# Generate documentation (but not for CI use)
if [ -n "$1" = "--ci" ]; then
cd docs
make html
cd ..
fi
deactivate
#!/usr/bin/env bash
# Test the AKPlanning setup
# execute as Utils/test.sh
# activate virtualenv when necessary
if [ -z ${VIRTUAL_ENV+x} ]; then
source venv/bin/activate
fi
# enable really all warnings, some of them are silenced by default
for arg in "$@"; do
if [[ "$arg" == "--all" ]]; then
export PYTHONWARNINGS=all
fi
done
# in case of checking production setup
for arg in "$@"; do
if [[ "$arg" == "--prod" ]]; then
export DJANGO_SETTINGS_MODULE=AKPlanning.settings_production
./manage.py test --deploy
fi
done
# run tests
./manage.py test
#!/usr/bin/env bash
# Update AKPlanning
# execute as Utils/check.sh
# execute as Utils/update.sh
# abort on error, print executed commands
set -ex
......@@ -15,12 +15,22 @@ if [ "$1" = "--prod" ]; then
export DJANGO_SETTINGS_MODULE=AKPlanning.settings_production
fi
# before potentially breaking anything, create a data backup
mkdir -p backups/
python manage.py dumpdata --indent=2 > "backups/$(date +"%Y%m%d%H%M")_datadump.json" --traceback
git pull
pip install --upgrade setuptools pip wheel
pip install --upgrade -r requirements.txt
./manage.py migrate
./manage.py collectstatic --noinput
./manage.py compilemessages
./manage.py compilemessages -l de_DE
# Update documentation
cd docs
make html
cd ..
touch AKPlanning/wsgi.py
_build/
code/
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Code
=====
.. toctree::
code/AKDashboard
code/AKModel
code/AKOnline
code/AKPlan
code/AKScheduling
code/AKSubmission
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import os
import sys
from recommonmark.parser import CommonMarkParser
import django
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'AK Planning'
copyright = '2025, N. Geisler, B. Hättasch & more'
author = 'N. Geisler, B. Hättasch & more'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
'sphinxcontrib.apidoc', # runs sphinx-apidoc automatically as part of sphinx-build
'sphinx.ext.autodoc', # the autodoc extensions uses files generated by apidoc
"sphinx.ext.autosummary",
"sphinxcontrib_django",
'sphinx.ext.viewcode', # enable viewing autodoc'd code
]
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# -- Django specific settings ------------------------------------------------
# Add source directory to sys.path
sys.path.insert(0, os.path.abspath(".."))
# Configure the path to the Django settings module
django_settings = "AKPlanning.settings"
os.environ['DJANGO_SETTINGS_MODULE'] = django_settings
django.setup()
# Include the database table names of Django models
django_show_db_tables = True # Boolean, default: False
# Add abstract database tables names (only takes effect if django_show_db_tables is True)
django_show_db_tables_abstract = True # Boolean, default: False
# Auto-generate API documentation.
os.environ['SPHINX_APIDOC_OPTIONS'] = "members,show-inheritance"
# -- Input ----
source_parsers = {
'.md': CommonMarkParser,
}
source_suffix = ['.rst', '.md']
# -- Extension Conf ----
autodoc_member_order = 'bysource'
autodoc_inherit_docstrings = False
apidoc_module_dir = '../'
apidoc_output_dir = 'code'
apidoc_excluded_paths = ['*/migrations',
'AKPlanning/',
'manage.py',
'docs',
'locale',
'Utils',
'*/urls.py',
]
apidoc_separate_modules = True
apidoc_toc_file = False
apidoc_module_first = True
apidoc_extra_args = ['-f']
apidoc_project = project
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_static_path = ['_static']
html_theme = 'sphinx_rtd_theme'
.. AK Planning documentation master file, created by
sphinx-quickstart on Wed Jun 21 09:54:11 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Start
=======================================
.. toctree::
:maxdepth: 2
:caption: Contents:
usage/usage
code
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)
if "%1" == "" goto help
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd
Usage
=====
.. toctree::
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-29 14:50+0000\n"
"POT-Creation-Date: 2023-08-16 16:30+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -18,10 +18,59 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: templates/base.html:73
#: templates/base.html:43
msgid ""
"Are you sure you want to change the language now? This will clear the form!"
msgstr "Wirklich jetzt die Sprache ändern? Das wird das Formular zurücksetzen!"
#: templates/base.html:108
msgid "Go to backend"
msgstr "Zum Backend"
#: templates/base.html:109
msgid "Docs"
msgstr "Doku"
#: templates/base.html:115
msgid "Impress"
msgstr "Impressum"
#: templates/base.html:74
#: templates/base.html:118
msgid "This software is open source"
msgstr "Diese Software ist Open Source"
#~ msgid "URL to the room or server"
#~ msgstr "URL zum Raum/Server"
#~ msgid "Room"
#~ msgstr "Raum"
#~ msgid "Virtual Room"
#~ msgstr "Virtueller Raum"
#~ msgid "Virtual Rooms"
#~ msgstr "Virtuelle Räume"
#~ msgid "Scheduling for"
#~ msgstr "Scheduling für"
#~ msgid "Day (Horizontal)"
#~ msgstr "Tag (horizontal)"
#~ msgid "Day (Vertical)"
#~ msgstr "Tag (vertikal)"
#~ msgid "Event (Horizontal)"
#~ msgstr "Event (horizontal)"
#~ msgid "Event (Vertical)"
#~ msgstr "Event (vertikal)"
#~ msgid "Event Status"
#~ msgstr "Event-Status"
#~ msgid "Unscheduled AK Slots"
#~ msgstr "Noch nicht geschedulte AK-Slots"
#~ msgid "Count"
#~ msgstr "Anzahl"
[MAIN]
ignore=urls.py, migrations, AKPlanning
load-plugins=
pylint_django,
pylint_django.checkers.migrations
django-settings-module=AKPlanning.settings
disable=
C0114, # missing-module-docstring
[FORMAT]
# Maximum number of characters on a single line.
max-line-length=120
indent-string=' '
[SIMILARITIES]
# Minimum lines number of a similarity.
min-similarity-lines=6
# Ignore comments when computing similarities.
ignore-comments=yes
# Ignore docstrings when computing similarities.
ignore-docstrings=yes
# Ignore imports when computing similarities.
ignore-imports=yes
# Signatures are removed from the similarity computation
ignore-signatures=yes
[BASIC]
# Regular expression matching correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|((tags_)*AK[A-Z][a-z0-9_]+))$
# Good variable names which should always be accepted, separated by a comma
good-names=i,j,k,a,e,ak,tz,_,pk
# Allow single-letter variables and enforce lowercase variables with underscores otherwise
variable-rgx=[a-z_][a-z0-9_]{0,30}$
[TYPECHECK]
# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes
# List of classes names for which member attributes should not be checked
# (useful for classes with attributes dynamically set).
ignored-classes=SQLObject,WSGIRequest
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E0201 when accessed.
generated-members=objects,DoesNotExist,id,pk,_meta,base_fields,context
# List of method names used to declare (i.e. assign) instance attributes
defining-attr-methods=__init__,__new__,setUp
[DESIGN]
max-parents=15
max-args=8