Fixes: 1) Correct `hreflang` field type in serializers and GraphQL object types. Extra: Refactor redundant `hreflang` handling; ensure uniform `LANGUAGE_CODE` usage throughout.
13 lines
391 B
Python
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())
|