Source code for org.views.external_link

from onegov.core.elements import BackLink
from onegov.org import _
from onegov.core.security import Private
from onegov.org import OrgApp
from onegov.org.forms.external_link import ExternalLinkForm
from onegov.org.layout import ExternalLinkLayout, DefaultLayout
from onegov.org.models.external_link import (
    ExternalLinkCollection, ExternalLink
)
from morepath import redirect


from typing import TYPE_CHECKING
if TYPE_CHECKING:
    from onegov.core.types import RenderData
    from onegov.org.request import OrgRequest
    from webob import Response






@OrgApp.form(
    model=ExternalLinkCollection, name='new', template='form.pt',
    permission=Private, form=get_external_link_form
)




@OrgApp.form(model=ExternalLink, name='edit', template='form.pt',
             permission=Private, form=get_external_link_form)




@OrgApp.view(model=ExternalLink, permission=Private, request_method='DELETE')