from django.contrib import admin
from django.urls import include, path
from django.views.decorators.cache import cache_page
from django.views.generic import TemplateView

from beesgospel import views

urlpatterns = [
    path("manifest.json",
         cache_page(3600 * 24)(views.ManifestView.as_view()), name="manifest"
    ),
    path("admin/", admin.site.urls),
    path("accounts/", include("django.contrib.auth.urls")),
    path("", views.HomeView.as_view(), name="home"),
    path("v2", TemplateView.as_view(template_name="index2.html"), name="home"),
    path("presentation/", views.PresentationView.as_view(), name="presentation"),
    path("contact/", TemplateView.as_view(template_name="contact.html"), name="contact"),
    path("agenda/", views.AgendaView.as_view(), name="agenda"),
    path("medias/", views.MediaView.as_view(prive=False), name="medias"),
    path("membres/", views.EspaceMembresView.as_view(), name="membres"),
    path("membres/nouveau/", views.MembreAddView.as_view(), name="membre-add"),
    path("membres/<int:pk>/edit/", views.MembreEditView.as_view(), name="membre-edit"),
    path("membres/<int:pk>/delete/", views.MembreDeleteView.as_view(), name="membre-delete"),
    path("membres/liste/", views.ListeMembresView.as_view(), name="liste-membres"),
    path("membres/documents/", views.MediaView.as_view(prive=True), name="docs-membres"),
]
