from onegov.core.security import Public
from onegov.landsgemeinde import LandsgemeindeApp
from onegov.landsgemeinde.layouts import DefaultLayout
from onegov.org.models import Search
from onegov.org.views.search import search
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from onegov.core.orm import Base
from onegov.core.types import RenderData
from onegov.landsgemeinde.request import LandsgemeindeRequest
from webob import Response
@LandsgemeindeApp.html(model=Search, template='search.pt', permission=Public)
[docs]
def landsgemeinde_search(
self: Search['Base'],
request: 'LandsgemeindeRequest'
) -> 'RenderData | Response':
return search(self, request, DefaultLayout(self, request))