Commit a081e30f authored by Ben Waters's avatar Ben Waters

i'm going to shoot forms

parent ec44a0b3
......@@ -5,13 +5,11 @@ from mainapp.models import Student, Major, Minor, GenEd
# form on new page
class StartTrajectoryForm(forms.Form):
majors = Major.objects.all()
print majors
minors = Minor.objects.all()
print minors
major = forms.ChoiceField(majors)
minor = forms.ChoiceField(majors)
pass
def __init__(self, *args, **kwargs):
super(StartTrajectoryForm,self).__init__(*args,**kwargs)
self.fields['majors'] = forms.ChoiceField(choices=Major.objects.all())
self.fields['minors'] = forms.ChoiceField(choices=Minor.objects.all())
class StudentForm(forms.ModelForm):
class Meta:
model = Student
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment