working to fix tag widgets in admin

This commit is contained in:
Sam
2021-03-04 12:37:15 +00:00
parent c99b81b751
commit 657b717c07
7 changed files with 50 additions and 4 deletions

14
products/forms.py Normal file
View File

@@ -0,0 +1,14 @@
from dal import autocomplete
from django import forms
from .models import CategoryTag
class CategoryTagForm(forms.ModelForm):
class Meta:
model = CategoryTag
fields = ('__all__')
widgets = {
'category': autocomplete.ModelSelect2(url='cagtegory-autocomplete')
}