mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 09:28:38 -06:00
#9623: Misc cleanup
This commit is contained in:
parent
13d39a28ce
commit
3468e8c8ae
@ -116,6 +116,7 @@ class SavedFilterForm(BootstrapMixin, forms.ModelForm):
|
|||||||
content_types = ContentTypeMultipleChoiceField(
|
content_types = ContentTypeMultipleChoiceField(
|
||||||
queryset=ContentType.objects.all()
|
queryset=ContentType.objects.all()
|
||||||
)
|
)
|
||||||
|
parameters = JSONField()
|
||||||
|
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
('Saved Filter', ('name', 'slug', 'content_types', 'description', 'weight', 'enabled', 'shared')),
|
('Saved Filter', ('name', 'slug', 'content_types', 'description', 'weight', 'enabled', 'shared')),
|
||||||
@ -125,9 +126,6 @@ class SavedFilterForm(BootstrapMixin, forms.ModelForm):
|
|||||||
class Meta:
|
class Meta:
|
||||||
model = SavedFilter
|
model = SavedFilter
|
||||||
exclude = ('user',)
|
exclude = ('user',)
|
||||||
widgets = {
|
|
||||||
'parameters': forms.Textarea(attrs={'class': 'font-monospace'}),
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(self, *args, initial=None, **kwargs):
|
def __init__(self, *args, initial=None, **kwargs):
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
Parameters
|
Parameters
|
||||||
</h5>
|
</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<pre>{{ object.parameters }}</pre>
|
<pre>{{ object.parameters|json }}</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% plugin_right_page object %}
|
{% plugin_right_page object %}
|
||||||
|
Loading…
Reference in New Issue
Block a user