symposion_app/symposion/reviews/forms.py
Sachi King 21b2a01a84 Py2 compatability has been broke elsewhere drop it
This is all noop in Py3, and Py2 is broke now in various places.
Dropping Py2 code as it will not be a thing going forward.

Django 2 is the next release, Py2 support will be dropped, as such,
dropping this is forward looking.
2017-04-29 15:47:19 +10:00

37 lines
947 B
Python

from django import forms
from django.utils.translation import ugettext_lazy as _
from symposion.reviews.models import Review, Comment, ProposalMessage, VOTES
class ReviewForm(forms.ModelForm):
class Meta:
model = Review
fields = ["vote", "comment"]
def __init__(self, *args, **kwargs):
super(ReviewForm, self).__init__(*args, **kwargs)
self.fields["vote"] = forms.ChoiceField(
widget=forms.RadioSelect(),
choices=VOTES.CHOICES
)
class ReviewCommentForm(forms.ModelForm):
class Meta:
model = Comment
fields = ["text"]
class SpeakerCommentForm(forms.ModelForm):
class Meta:
model = ProposalMessage
fields = ["message"]
class BulkPresentationForm(forms.Form):
talk_ids = forms.CharField(
label=_("Talk ids"),
max_length=500,
help_text=_("Provide a comma seperated list of talk ids to accept.")
)