This repository has been archived on 2026-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
RepApp/docs/dev/apps.md

2.5 KiB

Apps

The repapp is split into different modules, realized as Django apps, to improve the maintainability.

One time login

The one time login module provides a login for guests using a one time secret as part of an URL.

Configuration

To enable the one time login links, an additional authentication backend must get added:

# Repapp specific authentication backends
AUTHENTICATION_BACKENDS = [
    # Backend for one time logins
    "one_time_login.authentication_backends.OneTimeLoginBackend",
]

The one time login urls must get added using namespace one_time_login:

urlpatterns = i18n_patterns(
    ...
    path(_('one_time_login/'),
         include('one_time_login.urls', namespace='one_time_login')),
    ...
)

Email interface

The email interface modules supports handling of mails. It support sending of mails, including HTML formatting and attachments, and it supports receiving of plain text and HTML formatted mails, including attachments.

Configuration

The email interface urls must get added using namespace email_interface:

urlpatterns = i18n_patterns(
    ...
    path(_('emails/'),
         include('email_interface.urls', namespace='email_interface')),
    ...
)

To use CKEditor as authenticated user, the following additional urls must get added:

urlpatterns = i18n_patterns(
    ...
    # CKEditor upload views
    path('upload/', login_required(ckeditor_views.upload), name="ckeditor_upload"),
    path('browse/', never_cache(login_required(ckeditor_views.browse)),
         name="ckeditor_browse"),
    ...
)

To be abel to use CKEditor also the static an media content must get served. For development this is done with:

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)