schon/core/serializers/seo.py
Egor fureunoir Gorbunov 2f4cceaa6a Features: 1) Add hreflang to metadata response across viewsets; 2) Update GraphQL schema to use hreflang as a string instead of a list.
Fixes: 1) Correct `hreflang` field type in serializers and GraphQL object types.

Extra: Refactor redundant `hreflang` handling; ensure uniform `LANGUAGE_CODE` usage throughout.
2025-09-09 15:30:05 +03:00

13 lines
391 B
Python

from rest_framework.fields import CharField, DictField, ListField
from rest_framework.serializers import Serializer
class SeoSnapshotSerializer(Serializer):
title = CharField()
description = CharField()
canonical = CharField()
robots = CharField()
hreflang = CharField()
open_graph = DictField()
twitter = DictField()
json_ld = ListField(child=DictField())