Commit 05f916f4 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

form for creating new template: coming along

parent a0762f75
...@@ -33,8 +33,8 @@ class NewTrajectoryForm( ModelForm ): ...@@ -33,8 +33,8 @@ class NewTrajectoryForm( ModelForm ):
# def __init__(self, *args, **kwargs): # def __init__(self, *args, **kwargs):
class Meta: class Meta:
model = Trajectory model = Program
fields = ('name', 'degreeType', 'programType', fields = ('name', 'degreeType', 'programType', 'isHonors',
) )
exclude = ('courseReqs', 'created', 'last_modified', 'catalogYear', exclude = ('courseReqs', 'created', 'last_modified', 'catalogYear',
'isCompleted', 'isCompleted',
...@@ -46,8 +46,12 @@ class NewTrajectoryForm( ModelForm ): ...@@ -46,8 +46,12 @@ class NewTrajectoryForm( ModelForm ):
'placeholder' : 'Government and International Politics', 'placeholder' : 'Government and International Politics',
}), }),
# name of minor(s) # name of minor(s)
'name' : TextInput(attrs={
# are you in the honors college? 'class' : 'form-control',
'placeholder' = 'Software Engineering',
# current semester }),
} }
# class CreateTrajectoryForm ( ModelForm ):
# class StudentInfoForm( ModelForm ):
...@@ -80,9 +80,10 @@ class Program(BaseModel): ...@@ -80,9 +80,10 @@ class Program(BaseModel):
# courseCollections # courseCollections
courseReqs = models.ManyToManyField('CourseCollection',) courseReqs = models.ManyToManyField('CourseCollection',)
isHonors = models.BooleanField(False),
# is BA, BS, Honors # is BA, BS, Honors
# all majors must take a gened program, null for minors, geneds # all majors must take a gened program, null for minors, geneds
# CHECK VIEWS, MAKE SURE I DIDN'T ALREADY SOMEHOW ACCOUNT FOR THIS
degreeType = models.ManyToManyField('Program', null=True) degreeType = models.ManyToManyField('Program', null=True)
# major or minor or gened # major or minor or gened
...@@ -110,13 +111,15 @@ class Student(models.Model): ...@@ -110,13 +111,15 @@ class Student(models.Model):
user = models.OneToOneField(User) user = models.OneToOneField(User)
# does User have a slug field? # does User have a slug field?
# aka username, etc should all be here
# all of the student's trajectories # all of the student's trajectories
trajectory = models.ManyToManyField('Trajectory', null=True) trajectory = models.ManyToManyField('Trajectory', null=True)
# a big ol' list of courses the student has already completed # a big ol' list of courses the student has already completed
completedCourses = models.ManyToManyField('Course', null=True) completedCourses = models.ManyToManyField('Course', null=True)
# aka username, etc should all be here semester = models.IntegerField()
class Meta: class Meta:
ordering = ('user',) ordering = ('user',)
......
...@@ -24,6 +24,7 @@ start visualizing your way to completing your degree.</h4></p> ...@@ -24,6 +24,7 @@ start visualizing your way to completing your degree.</h4></p>
{% csrf_token %} {% csrf_token %}
<fieldset> <fieldset>
<!-- move to a user manage page form -->
<legend>Select your courses(s).</legend> <legend>Select your courses(s).</legend>
{% if courses %} {% if courses %}
<div class="alert alert-info">Do you need to update the courses you've already taken?</div> <div class="alert alert-info">Do you need to update the courses you've already taken?</div>
...@@ -71,9 +72,9 @@ start visualizing your way to completing your degree.</h4></p> ...@@ -71,9 +72,9 @@ start visualizing your way to completing your degree.</h4></p>
<button type="button" class="btn btn-primary">+</button> <button type="button" class="btn btn-primary">+</button>
</div> </div>
</div> </div>
<!-- #cooljsideas for this and select program, have a new field slide out
when one has been entered (2 for degree, 3 for minor)--> <!-- this is going to be moved to a manage user page form -->
<legend>Are you in the Honors College?</legend> <legend>Are you in the Honors College?</legend>
<div class="form-group"> <div class="form-group">
<label for "honorscollege" class="col-sm-2">Honors</label> <label for "honorscollege" class="col-sm-2">Honors</label>
...@@ -83,7 +84,7 @@ start visualizing your way to completing your degree.</h4></p> ...@@ -83,7 +84,7 @@ start visualizing your way to completing your degree.</h4></p>
</div> </div>
</div> </div>
<!-- also make this an optional field: e.g. we think you're a second semester junior... is that still the case? --> <!-- this is going to be moved to a manage user page form -->
<legend>What is your current semester?</legend> <legend>What is your current semester?</legend>
<div class="form-group"> <div class="form-group">
......
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