JourneyJoker/partners/forms.py

11 lines
407 B
Python
Raw Normal View History

from django.contrib.auth.forms import UserCreationForm
from django import forms
from .models import Establishment
class VerificationForm(forms.Form):
def get_choices():
for establishment in Establishment.objects.filter(verified=False):
yield ("%i" % establishment.id, "%i %s" % (establishment.id, establishment.name))
establishment = forms.ChoiceField(choices=get_choices)