mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-01 23:23:24 +02:00
Adds TenantGroup.comments to the required locations
- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [x] 6. Add fields to forms
- [x] tenancy.forms.model_forms, create/edit (e.g. model_forms.py)
- [x] tenancy.forms.bulk_edit, bulk edit
- [x] tenancy.forms.bulk_import, CSV import
- [NA] filter (UI and API)
- [x] 7. Extend object filter set
- [x] 8. Add column to object table
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
- [NA] models
- [x] views
- [NA] forms
- [x] filtersets
- [x] api
- [NA] 12. Update the model's documentation
This commit is contained in:
@@ -33,9 +33,10 @@ class TenantGroupBulkEditForm(NetBoxModelBulkEditForm):
|
||||
max_length=200,
|
||||
required=False
|
||||
)
|
||||
comments = CommentField()
|
||||
|
||||
model = TenantGroup
|
||||
nullable_fields = ('parent', 'description')
|
||||
nullable_fields = ('parent', 'description', 'comments')
|
||||
|
||||
|
||||
class TenantBulkEditForm(NetBoxModelBulkEditForm):
|
||||
|
||||
@@ -31,7 +31,7 @@ class TenantGroupImportForm(NetBoxModelImportForm):
|
||||
|
||||
class Meta:
|
||||
model = TenantGroup
|
||||
fields = ('name', 'slug', 'parent', 'description', 'tags')
|
||||
fields = ('name', 'slug', 'parent', 'description', 'tags', 'comments')
|
||||
|
||||
|
||||
class TenantImportForm(NetBoxModelImportForm):
|
||||
|
||||
@@ -27,6 +27,7 @@ class TenantGroupForm(NetBoxModelForm):
|
||||
required=False
|
||||
)
|
||||
slug = SlugField()
|
||||
comments = CommentField()
|
||||
|
||||
fieldsets = (
|
||||
FieldSet('parent', 'name', 'slug', 'description', 'tags', name=_('Tenant Group')),
|
||||
@@ -35,7 +36,7 @@ class TenantGroupForm(NetBoxModelForm):
|
||||
class Meta:
|
||||
model = TenantGroup
|
||||
fields = [
|
||||
'parent', 'name', 'slug', 'description', 'tags',
|
||||
'parent', 'name', 'slug', 'description', 'tags', 'comments'
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user