small admin improvements
This commit is contained in:
parent
b0a76b88b4
commit
d39ff91a74
2 changed files with 16 additions and 11 deletions
|
@ -502,6 +502,7 @@ class VSHNAppCatBaseFee(models.Model):
|
|||
)
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Service Base Fee"
|
||||
unique_together = ("vshn_appcat_price_config", "currency")
|
||||
ordering = ["currency"]
|
||||
|
||||
|
@ -592,21 +593,11 @@ class VSHNAppCatPrice(models.Model):
|
|||
choices=VariableUnit.choices,
|
||||
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(
|
||||
max_length=3,
|
||||
default=Term.MTH,
|
||||
choices=Term.choices,
|
||||
)
|
||||
|
||||
valid_from = models.DateTimeField(blank=True, null=True)
|
||||
valid_to = models.DateTimeField(blank=True, null=True)
|
||||
|
||||
discount_model = models.ForeignKey(
|
||||
ProgressiveDiscountModel,
|
||||
on_delete=models.SET_NULL,
|
||||
|
@ -615,6 +606,16 @@ class VSHNAppCatPrice(models.Model):
|
|||
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:
|
||||
verbose_name = "AppCat Price"
|
||||
|
||||
|
@ -678,6 +679,7 @@ class VSHNAppCatUnitRate(models.Model):
|
|||
)
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Service Unit Rate"
|
||||
unique_together = ("vshn_appcat_price_config", "currency", "service_level")
|
||||
ordering = ["currency", "service_level"]
|
||||
|
||||
|
|
|
@ -248,7 +248,10 @@ JAZZMIN_SETTINGS = {
|
|||
"navigation_expanded": True,
|
||||
"hide_apps": ["broker"],
|
||||
"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,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue