Remove unused select2 refs

Fix_link_to_HSWAW
Dariusz Niemczyk 2023-08-04 17:46:08 +02:00
rodzic 4fc3629dcd
commit e1a22100c4
Nie znaleziono w bazie danych klucza dla tego podpisu
1 zmienionych plików z 2 dodań i 5 usunięć

Wyświetl plik

@ -1,10 +1,8 @@
from django import forms from django import forms
from django.contrib import admin from django.contrib import admin
from django_select2.forms import Select2MultipleWidget
from .models import Item, ItemImage, Category, StaffProxyModel
from .models import Item, ItemImage, Category, Label, StaffProxyModel
from .widgets import PropsSelectWidget from .widgets import PropsSelectWidget
@ -25,7 +23,6 @@ class ItemForm(forms.ModelForm):
model = Item model = Item
exclude = [] exclude = []
widgets = { widgets = {
"categories": Select2MultipleWidget,
"props": PropsSelectWidget, "props": PropsSelectWidget,
} }
@ -41,7 +38,7 @@ class ItemAdmin(ModelAdminMixin, admin.ModelAdmin):
form = ItemForm form = ItemForm
inlines = [ItemImageInline] inlines = [ItemImageInline]
save_on_top = True save_on_top = True
autocomplete_fields = ["parent", "owner", "taken_by"] autocomplete_fields = ["parent", "owner", "taken_by", "categories"]
search_fields = ["name", "owner__name", "taken_by__name"] search_fields = ["name", "owner__name", "taken_by__name"]
def formfield_for_foreignkey(self, db_field, request, **kwargs): def formfield_for_foreignkey(self, db_field, request, **kwargs):