diff --git a/docs/models/dcim/racktype.md b/docs/models/dcim/racktype.md index 73fb08bcd..04dd63eee 100644 --- a/docs/models/dcim/racktype.md +++ b/docs/models/dcim/racktype.md @@ -10,9 +10,13 @@ A rack type defines the physical characteristics of a particular model of [rack] The [manufacturer](./manufacturer.md) which produces this type of rack. -### Name +### Model -The unique name of the rack type. +The model number assigned to this rack type by its manufacturer. Must be unique to the manufacturer. + +### Slug + +A unique URL-friendly representation of the model identifier. (This value can be used for filtering.) ### Form Factor diff --git a/netbox/dcim/forms/model_forms.py b/netbox/dcim/forms/model_forms.py index 6088fe0ae..477836467 100644 --- a/netbox/dcim/forms/model_forms.py +++ b/netbox/dcim/forms/model_forms.py @@ -208,7 +208,10 @@ class RackTypeForm(NetBoxModelForm): queryset=Manufacturer.objects.all() ) comments = CommentField() - slug = SlugField() + slug = SlugField( + label=_('Slug'), + slug_source='model' + ) fieldsets = ( FieldSet('manufacturer', 'model', 'slug', 'description', 'form_factor', 'airflow', 'tags', name=_('Rack Type')), diff --git a/netbox/dcim/search.py b/netbox/dcim/search.py index 32add68d0..38c1843fe 100644 --- a/netbox/dcim/search.py +++ b/netbox/dcim/search.py @@ -246,7 +246,7 @@ class PowerPortIndex(SearchIndex): class RackTypeIndex(SearchIndex): model = models.RackType fields = ( - ('name', 100), + ('model', 100), ('description', 500), ('comments', 5000), ) diff --git a/netbox/templates/dcim/racktype.html b/netbox/templates/dcim/racktype.html index c4e445146..8a1971af9 100644 --- a/netbox/templates/dcim/racktype.html +++ b/netbox/templates/dcim/racktype.html @@ -17,8 +17,8 @@