1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #11325: Move help_texts from model forms to models

This commit is contained in:
jeremystretch
2023-03-01 17:31:54 -05:00
parent 536b46158a
commit c44eb65993
19 changed files with 75 additions and 134 deletions

View File

@@ -129,21 +129,24 @@ class VLAN(PrimaryModel):
on_delete=models.PROTECT,
related_name='vlans',
blank=True,
null=True
null=True,
help_text=_("The specific site to which this VLAN is assigned (if any)")
)
group = models.ForeignKey(
to='ipam.VLANGroup',
on_delete=models.PROTECT,
related_name='vlans',
blank=True,
null=True
null=True,
help_text=_("VLAN group (optional)")
)
vid = models.PositiveSmallIntegerField(
verbose_name='ID',
validators=(
MinValueValidator(VLAN_VID_MIN),
MaxValueValidator(VLAN_VID_MAX)
)
),
help_text=_("Numeric VLAN ID (1-4094)")
)
name = models.CharField(
max_length=64
@@ -158,14 +161,16 @@ class VLAN(PrimaryModel):
status = models.CharField(
max_length=50,
choices=VLANStatusChoices,
default=VLANStatusChoices.STATUS_ACTIVE
default=VLANStatusChoices.STATUS_ACTIVE,
help_text=_("Operational status of this VLAN")
)
role = models.ForeignKey(
to='ipam.Role',
on_delete=models.SET_NULL,
related_name='vlans',
blank=True,
null=True
null=True,
help_text=_("The primary function of this VLAN")
)
l2vpn_terminations = GenericRelation(