mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 00:28:16 -06:00
17058 RackType name -> model
This commit is contained in:
parent
c2b325974a
commit
bcb99cdacd
@ -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.
|
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
|
### Form Factor
|
||||||
|
|
||||||
|
@ -208,7 +208,10 @@ class RackTypeForm(NetBoxModelForm):
|
|||||||
queryset=Manufacturer.objects.all()
|
queryset=Manufacturer.objects.all()
|
||||||
)
|
)
|
||||||
comments = CommentField()
|
comments = CommentField()
|
||||||
slug = SlugField()
|
slug = SlugField(
|
||||||
|
label=_('Slug'),
|
||||||
|
slug_source='model'
|
||||||
|
)
|
||||||
|
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
FieldSet('manufacturer', 'model', 'slug', 'description', 'form_factor', 'airflow', 'tags', name=_('Rack Type')),
|
FieldSet('manufacturer', 'model', 'slug', 'description', 'form_factor', 'airflow', 'tags', name=_('Rack Type')),
|
||||||
|
@ -246,7 +246,7 @@ class PowerPortIndex(SearchIndex):
|
|||||||
class RackTypeIndex(SearchIndex):
|
class RackTypeIndex(SearchIndex):
|
||||||
model = models.RackType
|
model = models.RackType
|
||||||
fields = (
|
fields = (
|
||||||
('name', 100),
|
('model', 100),
|
||||||
('description', 500),
|
('description', 500),
|
||||||
('comments', 5000),
|
('comments', 5000),
|
||||||
)
|
)
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
<td>{{ object.manufacturer|linkify }}</td>
|
<td>{{ object.manufacturer|linkify }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Name" %}</th>
|
<th scope="row">{% trans "Model" %}</th>
|
||||||
<td>{{ object.name }}</td>
|
<td>{{ object.model }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans "Description" %}</th>
|
<th scope="row">{% trans "Description" %}</th>
|
||||||
|
Loading…
Reference in New Issue
Block a user