Add og image to plan detail page

This commit is contained in:
Stefan Wehrmeyer 2022-03-16 10:29:23 +01:00
parent 673d3ec17b
commit 2f6963fe60
4 changed files with 89 additions and 1 deletions

View file

@ -2,7 +2,12 @@ from django.urls import path
from django.utils.translation import pgettext_lazy
from .admin import govplan_admin_site
from .views import GovPlanDetailView, GovPlanSectionDetailView, search
from .views import (
GovPlanDetailOGView,
GovPlanDetailView,
GovPlanSectionDetailView,
search,
)
app_name = "govplan"
@ -14,6 +19,11 @@ urlpatterns = [
GovPlanDetailView.as_view(),
name="plan",
),
path(
pgettext_lazy("url part", "<slug:gov>/plan/<slug:plan>/_og/"),
GovPlanDetailOGView.as_view(),
name="plan_og",
),
path(
pgettext_lazy("url part", "<slug:gov>/<slug:section>/"),
GovPlanSectionDetailView.as_view(),