Fix form rendering
This commit is contained in:
parent
9c0bbdcf92
commit
8b63d78633
3 changed files with 4 additions and 4 deletions
|
@ -49,7 +49,7 @@ class Organization(ServalaModelMixin, models.Model):
|
||||||
base = "/org/{self.slug}/"
|
base = "/org/{self.slug}/"
|
||||||
details = "{base}details/"
|
details = "{base}details/"
|
||||||
services = "{base}services/"
|
services = "{base}services/"
|
||||||
services = "{base}instances/"
|
instances = "{base}instances/"
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def slug(self):
|
def slug(self):
|
||||||
|
|
|
@ -320,8 +320,8 @@ class ControlPlaneCRD(ServalaModelMixin, models.Model):
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = _("Service offering control plane connection")
|
verbose_name = _("ControlPlane CRD")
|
||||||
verbose_name_plural = _("Service offering control planes connections")
|
verbose_name_plural = _("ControlPlane CRDs")
|
||||||
unique_together = [("service_offering", "control_plane")]
|
unique_together = [("service_offering", "control_plane")]
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
|
@ -27,7 +27,7 @@ class VerticalFormRenderer(TemplatesSetting):
|
||||||
def get_widget_input_type(self, widget):
|
def get_widget_input_type(self, widget):
|
||||||
if isinstance(widget, Textarea):
|
if isinstance(widget, Textarea):
|
||||||
return "textarea"
|
return "textarea"
|
||||||
return widget.input_type
|
return getattr(widget, "input_type", None)
|
||||||
|
|
||||||
def get_field_input_type(self, field):
|
def get_field_input_type(self, field):
|
||||||
widget = field.field.widget
|
widget = field.field.widget
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue