You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from django import forms
from .models import Beat, Author
from django_select2 import forms as s2forms
class AuthorWidget(s2forms.ModelSelect2MultipleWidget):
search_fields = [
'name__icontains',
]
class BeatAdditionForm(forms.ModelForm):
class Meta:
model = Beat
fields = ['url', 'name', 'audio', 'genre', 'album', 'author']
widgets = {
'author': AuthorWidget,
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Empty fields in my form:
Models.py
My template:
layout template:
views.py:
urls.py:
settings.py:
forms.py:
and the result is:
Where is the problem?
Beta Was this translation helpful? Give feedback.
All reactions