working to fix tag widgets in admin
This commit is contained in:
14
products/forms.py
Normal file
14
products/forms.py
Normal 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')
|
||||
}
|
||||
Reference in New Issue
Block a user