Document external_links schema
All checks were successful
Tests / test (push) Successful in 23s

This commit is contained in:
Tobias Kunze 2025-08-01 13:23:25 +02:00
parent e0d05302b5
commit 3c14c312d7

View file

@ -71,9 +71,14 @@ class Service(ServalaModelMixin, models.Model):
logo = models.ImageField( logo = models.ImageField(
upload_to="public/services", blank=True, null=True, verbose_name=_("Logo") upload_to="public/services", blank=True, null=True, verbose_name=_("Logo")
) )
# TODO schema
external_links = models.JSONField( external_links = models.JSONField(
null=True, blank=True, verbose_name=_("External links") null=True,
blank=True,
verbose_name=_("External links"),
help_text=(
'JSON array of link objects: {"url": "", "title": "", "featured": false}. '
"Featured links will be shown on the service list page, all other links will only show on the service and offering detail pages."
),
) )
class Meta: class Meta:
@ -270,7 +275,10 @@ class CloudProvider(ServalaModelMixin, models.Model):
verbose_name=_("Logo"), verbose_name=_("Logo"),
) )
external_links = models.JSONField( external_links = models.JSONField(
null=True, blank=True, verbose_name=_("External links") null=True,
blank=True,
verbose_name=_("External links"),
help_text=('JSON array of link objects: {"url": "", "title": ""}. '),
) )
class Meta: class Meta: