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

@ -139,7 +139,8 @@ class Site(PrimaryModel):
"""
name = models.CharField(
max_length=100,
unique=True
unique=True,
help_text=_("Full name of the site")
)
_name = NaturalOrderingField(
target_field='name',
@ -179,7 +180,7 @@ class Site(PrimaryModel):
facility = models.CharField(
max_length=50,
blank=True,
help_text=_('Local facility ID or description')
help_text=_("Local facility ID or description")
)
asns = models.ManyToManyField(
to='ipam.ASN',
@ -191,25 +192,27 @@ class Site(PrimaryModel):
)
physical_address = models.CharField(
max_length=200,
blank=True
blank=True,
help_text=_("Physical location of the building")
)
shipping_address = models.CharField(
max_length=200,
blank=True
blank=True,
help_text=_("If different from the physical address")
)
latitude = models.DecimalField(
max_digits=8,
decimal_places=6,
blank=True,
null=True,
help_text=_('GPS coordinate (latitude)')
help_text=_("GPS coordinate in decimal format (xx.yyyyyy)")
)
longitude = models.DecimalField(
max_digits=9,
decimal_places=6,
blank=True,
null=True,
help_text=_('GPS coordinate (longitude)')
help_text=_("GPS coordinate in decimal format (xx.yyyyyy)")
)
# Generic relations