Source code for feriennet.views.auth

from import Public
from onegov.feriennet import FeriennetApp, _
from import handle_registration
from onegov.user import Auth
from onegov.user.forms import RegistrationForm

from typing import TYPE_CHECKING
    from onegov.core.types import RenderData
    from onegov.feriennet.request import FeriennetRequest
    from webob import Response

    model=Auth, name='register', template='',
    permission=Public, form=RegistrationForm
[docs] def custom_handle_registration( self: Auth, request: 'FeriennetRequest', form: RegistrationForm ) -> 'RenderData | Response': if'require_full_age_for_registration', False): form.callout = _( # type:ignore[attr-defined] "The user account must be opened by a parent or guardian of " "full age." ) return handle_registration(self, request, form)