Installation¶
To install the mde-viewer package for your Django project, you need to follow two steps:
Installation from PyPi¶
The recommended way to install this package is via pip and PyPi via:
pip install mde-viewer
Or install it directly from the source code repository on Gitlab via:
pip install git+https://gitlab.hzdr.de/model-data-explorer/mde-viewer.git
The latter should however only be done if you want to access the development versions.
Install the Django App for your project¶
To use the mde-viewer package in your Django project, you need to add the app to your INSTALLED_APPS, configure your urls.py, run the migration, add a login button in your templates. Here are the step-by-step instructions:
Add the mde_viewer app to your INSTALLED_APPS
in your projects urlconf (see
ROOT_URLCONF
), add includemde_viewer.urls
via:from django.urls import include, path urlpatterns += [ path("mde-viewer/", include("mde_viewer.urls")), ]
Run
python manage.py migrate
to add models to your databaseConfigure the app to your needs (see Configuration options).
That’s it! For further adaption to you Django project, please head over to the
Configuration options. You can also have a look into the testproject
in the source code repository for a possible implementation.
Installation for development¶
Please head over to our contributing guide for installation instruction for development.