# Path: runner/models.py
# class User(UserAbstract):
#     def __str__(self):
#         return self.name ;
#     class Meta:
#         managed = True
#         db_table = 'User'


from django import forms
from django.contrib.admin import widgets  
from django.forms import ModelForm
from runner.models import User
from bus.models import *
from taxi.models import *
    email = forms.EmailField(label='Your mail', max_length=100)

class RouteAddForm(forms.Form):
    stop1 = forms.ModelChoiceField(queryset=Stop.objects.all(), to_field_name="id")
    stop2 = forms.ModelChoiceField(queryset=Stop.objects.all(), to_field_name="id")
    stop3 = forms.ModelChoiceField(queryset=Stop.objects.all(), to_field_name="id")
    stop4 = forms.ModelChoiceField(queryset=Stop.objects.all(), to_field_name="id")
    stop5 = forms.ModelChoiceField(queryset=Stop.objects.all(), to_field_name="id")
    time = forms.DateTimeField()
    bus = forms.ModelChoiceField(queryset=Bus.objects.filter(available=True), to_field_name='id')
    driver = forms.ModelChoiceField(queryset=Employee.objects.filter(post='DRIVER'), to_field_name='id')
    conductor = forms.ModelChoiceField(queryset=Employee.objects.filter(post='Conductor'), to_field_name='id')

class StopsForm(forms.Form):
    token = forms.CharField(label="token", max_length=200 )

class RouteForm(forms.Form):
    source = forms.ModelChoiceField(queryset=Stop.objects.all(), to_field_name="name")
    dest = forms.ModelChoiceField(queryset=Stop.objects.all(), to_field_name="name")
    time = forms.DateTimeField()
    token = forms.CharField(label='token', max_length=200)

class BusBookForm(forms.Form):
    user = forms.IntegerField()
    route = forms.IntegerField()
    payment_status = forms.CharField()
    seats = forms.IntegerField()
    seats_config = forms.CharField()
class UserSignupForm(ModelForm):
    class Meta:

# Path: runner/models.py
# class User(UserAbstract):
#     def __str__(self):
#         return self.name ;
#     class Meta:
#         managed = True
#         db_table = 'User'


# Path: runner/forms.py
from django import forms
from django.contrib.admin import widgets  
from django.forms import ModelForm
from runner.models import User
from bus.models import *
from taxi.models import *

    email = forms.EmailField(label='Your mail', max_length=100)

class RouteAddForm(forms.Form):
    stop1 = forms.ModelChoiceField(queryset=Stop.objects.all(), to_field_name="id")
    stop2 = forms.ModelChoiceField(queryset=Stop.objects.all(), to_field_name="id")
    stop3 = forms.ModelChoiceField(queryset=Stop.objects.all(), to_field_name="id")
    stop4 = forms.ModelChoiceField(queryset=Stop.objects.all(), to_field_name="id")
    stop5 = forms.ModelChoiceField(queryset=Stop.objects.all(), to_field_name="id")
    time = forms.DateTimeField()
    bus = forms.ModelChoiceField(queryset=Bus.objects.filter(available=True), to_field_name='id')
    driver = forms.ModelChoiceField(queryset=Employee.objects.filter(post='DRIVER'), to_field_name='id')
    conductor = forms.ModelChoiceField(queryset=Employee.objects.filter(post='Conductor'), to_field_name='id')

class StopsForm(forms.Form):
    token = forms.CharField(label="token", max_length=200 )

class RouteForm(forms.Form):
    source = forms.ModelChoiceField(queryset=Stop.objects.all(), to_field_name="name")
    dest = forms.ModelChoiceField(queryset=Stop.objects.all(), to_field_name="name")
    time = forms.DateTimeField()
    token = forms.CharField(label='token', max_length=200)

class BusBookForm(forms.Form):
    user = forms.IntegerField()
    route = forms.IntegerField()
    payment_status = forms.CharField()
    seats = forms.IntegerField()
    seats_config = forms.CharField()
class UserSignupForm(ModelForm):
    class Meta:

        model = User