small admin improvements

This commit is contained in:
Tobias Brunner 2025-05-23 08:57:20 +02:00
parent b0a76b88b4
commit d39ff91a74
No known key found for this signature in database
2 changed files with 16 additions and 11 deletions

View file

@ -502,6 +502,7 @@ class VSHNAppCatBaseFee(models.Model):
) )
class Meta: class Meta:
verbose_name = "Service Base Fee"
unique_together = ("vshn_appcat_price_config", "currency") unique_together = ("vshn_appcat_price_config", "currency")
ordering = ["currency"] ordering = ["currency"]
@ -592,21 +593,11 @@ class VSHNAppCatPrice(models.Model):
choices=VariableUnit.choices, choices=VariableUnit.choices,
default=VariableUnit.RAM, default=VariableUnit.RAM,
) )
ha_replica_min = models.IntegerField(
default=1, help_text="Minimum of replicas for HA"
)
ha_replica_max = models.IntegerField(
default=1, help_text="Maximum supported replicas"
)
term = models.CharField( term = models.CharField(
max_length=3, max_length=3,
default=Term.MTH, default=Term.MTH,
choices=Term.choices, choices=Term.choices,
) )
valid_from = models.DateTimeField(blank=True, null=True)
valid_to = models.DateTimeField(blank=True, null=True)
discount_model = models.ForeignKey( discount_model = models.ForeignKey(
ProgressiveDiscountModel, ProgressiveDiscountModel,
on_delete=models.SET_NULL, on_delete=models.SET_NULL,
@ -615,6 +606,16 @@ class VSHNAppCatPrice(models.Model):
related_name="price_configs", related_name="price_configs",
) )
ha_replica_min = models.IntegerField(
default=1, help_text="Minimum of replicas for HA"
)
ha_replica_max = models.IntegerField(
default=1, help_text="Maximum supported replicas"
)
valid_from = models.DateTimeField(blank=True, null=True)
valid_to = models.DateTimeField(blank=True, null=True)
class Meta: class Meta:
verbose_name = "AppCat Price" verbose_name = "AppCat Price"
@ -678,6 +679,7 @@ class VSHNAppCatUnitRate(models.Model):
) )
class Meta: class Meta:
verbose_name = "Service Unit Rate"
unique_together = ("vshn_appcat_price_config", "currency", "service_level") unique_together = ("vshn_appcat_price_config", "currency", "service_level")
ordering = ["currency", "service_level"] ordering = ["currency", "service_level"]

View file

@ -248,7 +248,10 @@ JAZZMIN_SETTINGS = {
"navigation_expanded": True, "navigation_expanded": True,
"hide_apps": ["broker"], "hide_apps": ["broker"],
"order_with_respect_to": ["services", "auth"], "order_with_respect_to": ["services", "auth"],
"changeform_format_overrides": {"services.ProgressiveDiscountModel": "single"}, "changeform_format_overrides": {
"services.ProgressiveDiscountModel": "single",
"services.VSHNAppCatPrice": "single",
},
"related_modal_active": True, "related_modal_active": True,
} }