Page:
technical documentation
Pages
EGON
Home
Home_en
api v1 compensation delete_de
api v1 compensation get_de
api v1 compensation json properties de
api v1 compensation post_de
api v1 compensation put_de
api v1 deduction delete_de
api v1 deduction get_de
api v1 deduction json properties de
api v1 deduction post_de
api v1 deduction put_de
api v1 ecoaccount delete_de
api v1 ecoaccount get_de
api v1 ecoaccount json properties de
api v1 ecoaccount post_de
api v1 ecoaccount put_de
api v1 ema delete_de
api v1 ema get_de
api v1 ema json properties de
api v1 ema post_de
api v1 ema put_de
api v1 intervention check_de
api v1 intervention delete_de
api v1 intervention get_de
api v1 intervention json properties de
api v1 intervention post_de
api v1 intervention put_de
api v1 share get_de
api v1 share put_de
api_de
custom commands
features
features_de
features_en
generate_report_de
konova codes
recalculate_parcels_de
technical documentation
technical documentation_de
6
technical documentation
mpeltriaux edited this page 2023-03-24 08:35:15 +01:00
Table of Contents
Technical documentation
Dependencies
There are certain dependencies for konova:
- Postgresql and initial setup
- An instance of a postgresql server must be reachable
- The database defined in
django_settings.py
must exist (default 'konova') - All django migrations need to be migrated into the database (
python manage.py migrate
) - The initial setup command needs to be run once after successful migration (
python manage.py setup
)
- Virtualenv
- Konova is a python project, therefore a virtual environment has to be created (>=python3.7) and used for the project
- This becomes obsolet in case of docker container based deployment
- Konova is a python project, therefore a virtual environment has to be created (>=python3.7) and used for the project
- PIP
- All python dependency requirements need to be fullfiled (
pip install -r requirements.txt
)- Run command in virtualenv (or docker container)!
- All python dependency requirements need to be fullfiled (
- Redis and celery
- An instance of a redis server must be reachable
- The configuration for a broker defined in
celery.py
needs to point to redis - Background processes need to be started (
celery -A konova worker -l INFO
)- More info here
- Keep in mind that each background process is an instance of konova itself!
- Codelists
- All codes that are used in konova (registration offices, biotope types, ...) are fetched from the rlp own public list of osiris keys (e.g. https://codelisten.naturschutz.rlp.de/repository/referenzliste/903)
- Codes can be fetched using the custom command found in app
codelist
in konova (python manage.py update_codelist
)- This should be run once a night, e.g. using cron as scheduler
- Parcel intersectioning
- Entries that are create or edited and hold a geometry will try to resolve the legal parcel information using the geometry
- The application
Schneider
provides such functionalities and lives on lanis-gov02- More info on
Schneider
can be found here
- More info on
- E-Mail sending
- An instance of any smtp server must be reachable (e.g. LDI own)
- To be able to send any mails, the proper configurations must be set in
django_settings.py
(e.g.EMAIL_HOST
,EMAIL_PORT
, ...)
API
All details regarding the API can be found here.
News and ServerMessages
News can be added to the landing page of every user by adding new entries for the model ServerMessage
on the admin backend.
Each entries behaviour can be configured using the attributes:
- is_active
- Toggles the visibility of a message. If false, the message will not be displayed on any landing page.
- publish_on
- The message will appear on landing pages once this timestamp has been reached.
- unpublish_on (optional)
- The message will disappear from landing pages once this timestamp has been reached
- If no value is provided, the message will stay forever
- importance
- Select a level of importance from the given options
- Depending on the selected level, other styles will be used to highlight the message entry on the landing pages
- standard --> regular, no specific background color
- info --> informative, light blue background color
- warning --> warning, light red background color
Restoring deleted entries
All major entries (EIV, KOM, EMA, OEK) can be restored if they have been 'deleted' by a user. On the backend admin: Mark the entry using the checkbox and select from the drop-down menu the restore-deleted-entry action.
Errors
If any errors occur on the deployed system, the error will automatically been sent to all mail addresses that are defined as ADMINS
in django_settings.py
.