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

@@ -480,7 +480,8 @@ class Device(PrimaryModel, ConfigContextModel):
device_role = models.ForeignKey(
to='dcim.DeviceRole',
on_delete=models.PROTECT,
related_name='devices'
related_name='devices',
help_text=_("The function this device serves")
)
tenant = models.ForeignKey(
to='tenancy.Tenant',
@@ -510,7 +511,8 @@ class Device(PrimaryModel, ConfigContextModel):
serial = models.CharField(
max_length=50,
blank=True,
verbose_name='Serial number'
verbose_name='Serial number',
help_text=_("Chassis serial number, assigned by the manufacturer")
)
asset_tag = models.CharField(
max_length=50,
@@ -597,12 +599,14 @@ class Device(PrimaryModel, ConfigContextModel):
vc_position = models.PositiveSmallIntegerField(
blank=True,
null=True,
validators=[MaxValueValidator(255)]
validators=[MaxValueValidator(255)],
help_text=_('Virtual chassis position')
)
vc_priority = models.PositiveSmallIntegerField(
blank=True,
null=True,
validators=[MaxValueValidator(255)]
validators=[MaxValueValidator(255)],
help_text=_('Virtual chassis master election priority')
)
config_template = models.ForeignKey(
to='extras.ConfigTemplate',