You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
421 B
12 lines
421 B
from django import forms
|
|
from django.forms.widgets import RadioChoiceInput
|
|
from main.models import Feedback, STARS_CHOICES
|
|
|
|
|
|
class FeedbackForm(forms.ModelForm):
|
|
stars = forms.IntegerField(widget=forms.RadioSelect(choices=STARS_CHOICES), label='Оценка')
|
|
|
|
class Meta:
|
|
model = Feedback
|
|
fields = ['stars', 'name', 'email', 'text', ]
|
|
# widgets = {'stars': forms.RadioSelect(hidden=True)} |