mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-25 00:36:11 -06:00
13149 add gettext_lazy to forms
This commit is contained in:
parent
b6e50b789c
commit
887dfa0234
@ -1,7 +1,7 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from extras.choices import CustomFieldFilterLogicChoices, CustomFieldTypeChoices, CustomFieldVisibilityChoices
|
from extras.choices import CustomFieldFilterLogicChoices, CustomFieldTypeChoices, CustomFieldVisibilityChoices
|
||||||
from extras.forms.mixins import CustomFieldsMixin, SavedFiltersMixin
|
from extras.forms.mixins import CustomFieldsMixin, SavedFiltersMixin
|
||||||
@ -28,7 +28,8 @@ class NetBoxModelForm(BootstrapMixin, CustomFieldsMixin, forms.ModelForm):
|
|||||||
fieldsets = ()
|
fieldsets = ()
|
||||||
tags = DynamicModelMultipleChoiceField(
|
tags = DynamicModelMultipleChoiceField(
|
||||||
queryset=Tag.objects.all(),
|
queryset=Tag.objects.all(),
|
||||||
required=False
|
required=False,
|
||||||
|
label=_('Tags'),
|
||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
@ -73,10 +74,12 @@ class NetBoxModelImportForm(CSVModelForm, NetBoxModelForm):
|
|||||||
Base form for creating a NetBox objects from CSV data. Used for bulk importing.
|
Base form for creating a NetBox objects from CSV data. Used for bulk importing.
|
||||||
"""
|
"""
|
||||||
id = forms.IntegerField(
|
id = forms.IntegerField(
|
||||||
|
label=_('Id'),
|
||||||
required=False,
|
required=False,
|
||||||
help_text='Numeric ID of an existing object to update (if not creating a new object)'
|
help_text='Numeric ID of an existing object to update (if not creating a new object)'
|
||||||
)
|
)
|
||||||
tags = CSVModelMultipleChoiceField(
|
tags = CSVModelMultipleChoiceField(
|
||||||
|
label=_('Tags'),
|
||||||
queryset=Tag.objects.all(),
|
queryset=Tag.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
to_field_name='slug',
|
to_field_name='slug',
|
||||||
@ -105,14 +108,17 @@ class NetBoxModelBulkEditForm(BootstrapMixin, CustomFieldsMixin, forms.Form):
|
|||||||
nullable_fields = ()
|
nullable_fields = ()
|
||||||
|
|
||||||
pk = forms.ModelMultipleChoiceField(
|
pk = forms.ModelMultipleChoiceField(
|
||||||
|
label=_('Pk'),
|
||||||
queryset=None, # Set from self.model on init
|
queryset=None, # Set from self.model on init
|
||||||
widget=forms.MultipleHiddenInput
|
widget=forms.MultipleHiddenInput
|
||||||
)
|
)
|
||||||
add_tags = DynamicModelMultipleChoiceField(
|
add_tags = DynamicModelMultipleChoiceField(
|
||||||
|
label=_('Add tags'),
|
||||||
queryset=Tag.objects.all(),
|
queryset=Tag.objects.all(),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
remove_tags = DynamicModelMultipleChoiceField(
|
remove_tags = DynamicModelMultipleChoiceField(
|
||||||
|
label=_('Remove tags'),
|
||||||
queryset=Tag.objects.all(),
|
queryset=Tag.objects.all(),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from netbox.forms import NetBoxModelBulkEditForm
|
from netbox.forms import NetBoxModelBulkEditForm
|
||||||
from tenancy.choices import ContactPriorityChoices
|
from tenancy.choices import ContactPriorityChoices
|
||||||
@ -22,10 +23,12 @@ __all__ = (
|
|||||||
|
|
||||||
class TenantGroupBulkEditForm(NetBoxModelBulkEditForm):
|
class TenantGroupBulkEditForm(NetBoxModelBulkEditForm):
|
||||||
parent = DynamicModelChoiceField(
|
parent = DynamicModelChoiceField(
|
||||||
|
label=_('Parent'),
|
||||||
queryset=TenantGroup.objects.all(),
|
queryset=TenantGroup.objects.all(),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
description = forms.CharField(
|
description = forms.CharField(
|
||||||
|
label=_('Description'),
|
||||||
max_length=200,
|
max_length=200,
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
@ -36,6 +39,7 @@ class TenantGroupBulkEditForm(NetBoxModelBulkEditForm):
|
|||||||
|
|
||||||
class TenantBulkEditForm(NetBoxModelBulkEditForm):
|
class TenantBulkEditForm(NetBoxModelBulkEditForm):
|
||||||
group = DynamicModelChoiceField(
|
group = DynamicModelChoiceField(
|
||||||
|
label=_('Group'),
|
||||||
queryset=TenantGroup.objects.all(),
|
queryset=TenantGroup.objects.all(),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
@ -53,10 +57,12 @@ class TenantBulkEditForm(NetBoxModelBulkEditForm):
|
|||||||
|
|
||||||
class ContactGroupBulkEditForm(NetBoxModelBulkEditForm):
|
class ContactGroupBulkEditForm(NetBoxModelBulkEditForm):
|
||||||
parent = DynamicModelChoiceField(
|
parent = DynamicModelChoiceField(
|
||||||
|
label=_('Parent'),
|
||||||
queryset=ContactGroup.objects.all(),
|
queryset=ContactGroup.objects.all(),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
description = forms.CharField(
|
description = forms.CharField(
|
||||||
|
label=_('Desciption'),
|
||||||
max_length=200,
|
max_length=200,
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
@ -70,6 +76,7 @@ class ContactGroupBulkEditForm(NetBoxModelBulkEditForm):
|
|||||||
|
|
||||||
class ContactRoleBulkEditForm(NetBoxModelBulkEditForm):
|
class ContactRoleBulkEditForm(NetBoxModelBulkEditForm):
|
||||||
description = forms.CharField(
|
description = forms.CharField(
|
||||||
|
label=_('Description'),
|
||||||
max_length=200,
|
max_length=200,
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
@ -83,33 +90,40 @@ class ContactRoleBulkEditForm(NetBoxModelBulkEditForm):
|
|||||||
|
|
||||||
class ContactBulkEditForm(NetBoxModelBulkEditForm):
|
class ContactBulkEditForm(NetBoxModelBulkEditForm):
|
||||||
group = DynamicModelChoiceField(
|
group = DynamicModelChoiceField(
|
||||||
|
label=_('Group'),
|
||||||
queryset=ContactGroup.objects.all(),
|
queryset=ContactGroup.objects.all(),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
title = forms.CharField(
|
title = forms.CharField(
|
||||||
|
label=_('Title'),
|
||||||
max_length=100,
|
max_length=100,
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
phone = forms.CharField(
|
phone = forms.CharField(
|
||||||
|
label=_('Phone'),
|
||||||
max_length=50,
|
max_length=50,
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
email = forms.EmailField(
|
email = forms.EmailField(
|
||||||
|
label=_('Email'),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
address = forms.CharField(
|
address = forms.CharField(
|
||||||
|
label=_('Address'),
|
||||||
max_length=200,
|
max_length=200,
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
link = forms.URLField(
|
link = forms.URLField(
|
||||||
|
label=_('Link'),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
description = forms.CharField(
|
description = forms.CharField(
|
||||||
|
label=_('Description'),
|
||||||
max_length=200,
|
max_length=200,
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
comments = CommentField(
|
comments = CommentField(
|
||||||
label='Comments'
|
label=_('Comments')
|
||||||
)
|
)
|
||||||
|
|
||||||
model = Contact
|
model = Contact
|
||||||
@ -121,14 +135,17 @@ class ContactBulkEditForm(NetBoxModelBulkEditForm):
|
|||||||
|
|
||||||
class ContactAssignmentBulkEditForm(NetBoxModelBulkEditForm):
|
class ContactAssignmentBulkEditForm(NetBoxModelBulkEditForm):
|
||||||
contact = DynamicModelChoiceField(
|
contact = DynamicModelChoiceField(
|
||||||
|
label=_('Contact'),
|
||||||
queryset=Contact.objects.all(),
|
queryset=Contact.objects.all(),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
role = DynamicModelChoiceField(
|
role = DynamicModelChoiceField(
|
||||||
|
label=_('Role'),
|
||||||
queryset=ContactRole.objects.all(),
|
queryset=ContactRole.objects.all(),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
priority = forms.ChoiceField(
|
priority = forms.ChoiceField(
|
||||||
|
label=_('Priority'),
|
||||||
choices=add_blank_choice(ContactPriorityChoices),
|
choices=add_blank_choice(ContactPriorityChoices),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from netbox.forms import NetBoxModelImportForm
|
from netbox.forms import NetBoxModelImportForm
|
||||||
from tenancy.models import *
|
from tenancy.models import *
|
||||||
from utilities.forms.fields import CSVModelChoiceField, SlugField
|
from utilities.forms.fields import CSVModelChoiceField, SlugField
|
||||||
@ -18,12 +18,15 @@ __all__ = (
|
|||||||
|
|
||||||
class TenantGroupImportForm(NetBoxModelImportForm):
|
class TenantGroupImportForm(NetBoxModelImportForm):
|
||||||
parent = CSVModelChoiceField(
|
parent = CSVModelChoiceField(
|
||||||
|
label=_('Parent'),
|
||||||
queryset=TenantGroup.objects.all(),
|
queryset=TenantGroup.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
to_field_name='name',
|
to_field_name='name',
|
||||||
help_text=_('Parent group')
|
help_text=_('Parent group')
|
||||||
)
|
)
|
||||||
slug = SlugField()
|
slug = SlugField(
|
||||||
|
label=_('Slug'),
|
||||||
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = TenantGroup
|
model = TenantGroup
|
||||||
@ -31,8 +34,11 @@ class TenantGroupImportForm(NetBoxModelImportForm):
|
|||||||
|
|
||||||
|
|
||||||
class TenantImportForm(NetBoxModelImportForm):
|
class TenantImportForm(NetBoxModelImportForm):
|
||||||
slug = SlugField()
|
slug = SlugField(
|
||||||
|
label=_('Slug'),
|
||||||
|
)
|
||||||
group = CSVModelChoiceField(
|
group = CSVModelChoiceField(
|
||||||
|
label=_('Group'),
|
||||||
queryset=TenantGroup.objects.all(),
|
queryset=TenantGroup.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
to_field_name='name',
|
to_field_name='name',
|
||||||
@ -50,12 +56,15 @@ class TenantImportForm(NetBoxModelImportForm):
|
|||||||
|
|
||||||
class ContactGroupImportForm(NetBoxModelImportForm):
|
class ContactGroupImportForm(NetBoxModelImportForm):
|
||||||
parent = CSVModelChoiceField(
|
parent = CSVModelChoiceField(
|
||||||
|
label=_('Parent'),
|
||||||
queryset=ContactGroup.objects.all(),
|
queryset=ContactGroup.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
to_field_name='name',
|
to_field_name='name',
|
||||||
help_text=_('Parent group')
|
help_text=_('Parent group')
|
||||||
)
|
)
|
||||||
slug = SlugField()
|
slug = SlugField(
|
||||||
|
label=_('Slug'),
|
||||||
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = ContactGroup
|
model = ContactGroup
|
||||||
@ -63,7 +72,9 @@ class ContactGroupImportForm(NetBoxModelImportForm):
|
|||||||
|
|
||||||
|
|
||||||
class ContactRoleImportForm(NetBoxModelImportForm):
|
class ContactRoleImportForm(NetBoxModelImportForm):
|
||||||
slug = SlugField()
|
slug = SlugField(
|
||||||
|
label=_('Slug'),
|
||||||
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = ContactRole
|
model = ContactRole
|
||||||
@ -72,6 +83,7 @@ class ContactRoleImportForm(NetBoxModelImportForm):
|
|||||||
|
|
||||||
class ContactImportForm(NetBoxModelImportForm):
|
class ContactImportForm(NetBoxModelImportForm):
|
||||||
group = CSVModelChoiceField(
|
group = CSVModelChoiceField(
|
||||||
|
label=_('Group'),
|
||||||
queryset=ContactGroup.objects.all(),
|
queryset=ContactGroup.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
to_field_name='name',
|
to_field_name='name',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from extras.utils import FeatureQuery
|
from extras.utils import FeatureQuery
|
||||||
from netbox.forms import NetBoxModelFilterSetForm
|
from netbox.forms import NetBoxModelFilterSetForm
|
||||||
@ -84,7 +84,7 @@ class ContactAssignmentFilterForm(NetBoxModelFilterSetForm):
|
|||||||
model = ContactAssignment
|
model = ContactAssignment
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
(None, ('q', 'filter_id')),
|
(None, ('q', 'filter_id')),
|
||||||
('Assignment', ('content_type_id', 'group_id', 'contact_id', 'role_id', 'priority')),
|
(_('Assignment'), ('content_type_id', 'group_id', 'contact_id', 'role_id', 'priority')),
|
||||||
)
|
)
|
||||||
content_type_id = ContentTypeMultipleChoiceField(
|
content_type_id = ContentTypeMultipleChoiceField(
|
||||||
queryset=ContentType.objects.all(),
|
queryset=ContentType.objects.all(),
|
||||||
@ -108,6 +108,7 @@ class ContactAssignmentFilterForm(NetBoxModelFilterSetForm):
|
|||||||
label=_('Role')
|
label=_('Role')
|
||||||
)
|
)
|
||||||
priority = forms.MultipleChoiceField(
|
priority = forms.MultipleChoiceField(
|
||||||
|
label=_('Priority'),
|
||||||
choices=ContactPriorityChoices,
|
choices=ContactPriorityChoices,
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from tenancy.models import *
|
from tenancy.models import *
|
||||||
from utilities.forms.fields import DynamicModelChoiceField, DynamicModelMultipleChoiceField
|
from utilities.forms.fields import DynamicModelChoiceField, DynamicModelMultipleChoiceField
|
||||||
@ -13,6 +13,7 @@ __all__ = (
|
|||||||
|
|
||||||
class TenancyForm(forms.Form):
|
class TenancyForm(forms.Form):
|
||||||
tenant_group = DynamicModelChoiceField(
|
tenant_group = DynamicModelChoiceField(
|
||||||
|
label=_('Tenant group'),
|
||||||
queryset=TenantGroup.objects.all(),
|
queryset=TenantGroup.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
null_option='None',
|
null_option='None',
|
||||||
@ -21,6 +22,7 @@ class TenancyForm(forms.Form):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
tenant = DynamicModelChoiceField(
|
tenant = DynamicModelChoiceField(
|
||||||
|
label=_('Tenant'),
|
||||||
queryset=Tenant.objects.all(),
|
queryset=Tenant.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
query_params={
|
query_params={
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from netbox.forms import NetBoxModelForm
|
from netbox.forms import NetBoxModelForm
|
||||||
from tenancy.models import *
|
from tenancy.models import *
|
||||||
@ -21,13 +22,16 @@ __all__ = (
|
|||||||
|
|
||||||
class TenantGroupForm(NetBoxModelForm):
|
class TenantGroupForm(NetBoxModelForm):
|
||||||
parent = DynamicModelChoiceField(
|
parent = DynamicModelChoiceField(
|
||||||
|
label=_('Parent'),
|
||||||
queryset=TenantGroup.objects.all(),
|
queryset=TenantGroup.objects.all(),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
slug = SlugField()
|
slug = SlugField(
|
||||||
|
label=_('Slug'),
|
||||||
|
)
|
||||||
|
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
('Tenant Group', (
|
(_('Tenant Group'), (
|
||||||
'parent', 'name', 'slug', 'description', 'tags',
|
'parent', 'name', 'slug', 'description', 'tags',
|
||||||
)),
|
)),
|
||||||
)
|
)
|
||||||
@ -40,15 +44,20 @@ class TenantGroupForm(NetBoxModelForm):
|
|||||||
|
|
||||||
|
|
||||||
class TenantForm(NetBoxModelForm):
|
class TenantForm(NetBoxModelForm):
|
||||||
slug = SlugField()
|
slug = SlugField(
|
||||||
|
label=_('Slug'),
|
||||||
|
)
|
||||||
group = DynamicModelChoiceField(
|
group = DynamicModelChoiceField(
|
||||||
|
label=_('Group'),
|
||||||
queryset=TenantGroup.objects.all(),
|
queryset=TenantGroup.objects.all(),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
comments = CommentField()
|
comments = CommentField(
|
||||||
|
label=_('Comments'),
|
||||||
|
)
|
||||||
|
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
('Tenant', ('name', 'slug', 'group', 'description', 'tags')),
|
(_('Tenant'), ('name', 'slug', 'group', 'description', 'tags')),
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
@ -64,13 +73,16 @@ class TenantForm(NetBoxModelForm):
|
|||||||
|
|
||||||
class ContactGroupForm(NetBoxModelForm):
|
class ContactGroupForm(NetBoxModelForm):
|
||||||
parent = DynamicModelChoiceField(
|
parent = DynamicModelChoiceField(
|
||||||
|
label=_('Parent'),
|
||||||
queryset=ContactGroup.objects.all(),
|
queryset=ContactGroup.objects.all(),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
slug = SlugField()
|
slug = SlugField(
|
||||||
|
label=_('Slug'),
|
||||||
|
)
|
||||||
|
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
('Contact Group', (
|
(_('Contact Group'), (
|
||||||
'parent', 'name', 'slug', 'description', 'tags',
|
'parent', 'name', 'slug', 'description', 'tags',
|
||||||
)),
|
)),
|
||||||
)
|
)
|
||||||
@ -81,10 +93,12 @@ class ContactGroupForm(NetBoxModelForm):
|
|||||||
|
|
||||||
|
|
||||||
class ContactRoleForm(NetBoxModelForm):
|
class ContactRoleForm(NetBoxModelForm):
|
||||||
slug = SlugField()
|
slug = SlugField(
|
||||||
|
label=_('Slug'),
|
||||||
|
)
|
||||||
|
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
('Contact Role', (
|
(_('Contact Role'), (
|
||||||
'name', 'slug', 'description', 'tags',
|
'name', 'slug', 'description', 'tags',
|
||||||
)),
|
)),
|
||||||
)
|
)
|
||||||
@ -96,13 +110,16 @@ class ContactRoleForm(NetBoxModelForm):
|
|||||||
|
|
||||||
class ContactForm(NetBoxModelForm):
|
class ContactForm(NetBoxModelForm):
|
||||||
group = DynamicModelChoiceField(
|
group = DynamicModelChoiceField(
|
||||||
|
label=_('Group'),
|
||||||
queryset=ContactGroup.objects.all(),
|
queryset=ContactGroup.objects.all(),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
comments = CommentField()
|
comments = CommentField(
|
||||||
|
label=_('Comments'),
|
||||||
|
)
|
||||||
|
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
('Contact', ('group', 'name', 'title', 'phone', 'email', 'address', 'link', 'description', 'tags')),
|
(_('Contact'), ('group', 'name', 'title', 'phone', 'email', 'address', 'link', 'description', 'tags')),
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
@ -117,6 +134,7 @@ class ContactForm(NetBoxModelForm):
|
|||||||
|
|
||||||
class ContactAssignmentForm(BootstrapMixin, forms.ModelForm):
|
class ContactAssignmentForm(BootstrapMixin, forms.ModelForm):
|
||||||
group = DynamicModelChoiceField(
|
group = DynamicModelChoiceField(
|
||||||
|
label=_('Group'),
|
||||||
queryset=ContactGroup.objects.all(),
|
queryset=ContactGroup.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
initial_params={
|
initial_params={
|
||||||
@ -124,12 +142,14 @@ class ContactAssignmentForm(BootstrapMixin, forms.ModelForm):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
contact = DynamicModelChoiceField(
|
contact = DynamicModelChoiceField(
|
||||||
|
label=_('Contact'),
|
||||||
queryset=Contact.objects.all(),
|
queryset=Contact.objects.all(),
|
||||||
query_params={
|
query_params={
|
||||||
'group_id': '$group'
|
'group_id': '$group'
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
role = DynamicModelChoiceField(
|
role = DynamicModelChoiceField(
|
||||||
|
label=_('Role'),
|
||||||
queryset=ContactRole.objects.all()
|
queryset=ContactRole.objects.all()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user