1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
This commit is contained in:
Jeremy Stretch
2019-12-11 15:55:33 -05:00
parent ce4a5a38a3
commit fd88ba65b2
3 changed files with 9 additions and 13 deletions

View File

@ -14,7 +14,6 @@ from utilities.forms import (
BOOLEAN_WITH_BLANK_CHOICES,
)
from .choices import *
from .constants import *
from .models import ConfigContext, CustomField, CustomFieldValue, ImageAttachment, ObjectChange, Tag
@ -238,6 +237,14 @@ class TagBulkEditForm(BootstrapMixin, BulkEditForm):
#
class ConfigContextForm(BootstrapMixin, forms.ModelForm):
tags = forms.ModelMultipleChoiceField(
queryset=Tag.objects.all(),
to_field_name='slug',
required=False,
widget=APISelectMultiple(
api_url="/api/extras/tags/"
)
)
data = JSONField(
label=''
)
@ -267,9 +274,6 @@ class ConfigContextForm(BootstrapMixin, forms.ModelForm):
'tenants': APISelectMultiple(
api_url="/api/tenancy/tenants/"
),
'tags': APISelectMultiple(
api_url="/api/extras/tags/"
)
}