1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #4837: Use dynamic form widget for relationships to MPTT objects

This commit is contained in:
Jeremy Stretch
2020-07-09 09:50:01 -04:00
parent b535608519
commit 15525392a2
10 changed files with 28 additions and 37 deletions

View File

@ -18,10 +18,7 @@ from .models import Tenant, TenantGroup
class TenantGroupForm(BootstrapMixin, forms.ModelForm):
parent = DynamicModelChoiceField(
queryset=TenantGroup.objects.all(),
required=False,
widget=APISelect(
api_url="/api/tenancy/tenant-groups/"
)
required=False
)
slug = SlugField()