Skip to content
Snippets Groups Projects
Commit f16c6853 authored by jan.bednarik's avatar jan.bednarik
Browse files

elections2021: Metadata tweaks

parent 772765b0
No related branches found
No related tags found
2 merge requests!279elections2021: Metadata tweaks,!278elections2021: Metadata tweaks
Pipeline #3791 passed
import json
import re
from functools import cached_property
from django import forms
......@@ -1696,6 +1697,11 @@ class Elections2021ProgramPointPage(SubpageMixin, MetadataPageMixin, Page):
class Meta:
verbose_name = "Programový bod"
def get_meta_description(self):
if self.search_description:
return self.search_description
return re.sub(r"<.*?>|\[.*?\]", "", self.annotation)
@property
def archetype(self):
if self.weight_ministry_transport:
......
......@@ -240,6 +240,8 @@ CAPTCHA_LETTER_ROTATION = (-20, 20)
CAPTCHA_FONT_SIZE = 30
CAPTCHA_IMAGE_SIZE = (120, 47)
# meta image size
WAGTAILMETADATA_IMAGE_FILTER = "max-1600x1600"
# CUSTOM APPS SETTINGS
# ------------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment