Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nathan R Lapierre
advisor
Commits
05f916f4
Commit
05f916f4
authored
Feb 01, 2014
by
Daniel W Bond
Browse files
form for creating new template: coming along
parent
a0762f75
Changes
3
Hide whitespace changes
Inline
Side-by-side
advisor/trajectories/forms.py
View file @
05f916f4
...
...
@@ -33,8 +33,8 @@ class NewTrajectoryForm( ModelForm ):
# def __init__(self, *args, **kwargs):
class
Meta
:
model
=
Trajectory
fields
=
(
'name'
,
'degreeType'
,
'programType'
,
model
=
Program
fields
=
(
'name'
,
'degreeType'
,
'programType'
,
'isHonors'
,
)
exclude
=
(
'courseReqs'
,
'created'
,
'last_modified'
,
'catalogYear'
,
'isCompleted'
,
...
...
@@ -46,8 +46,12 @@ class NewTrajectoryForm( ModelForm ):
'placeholder'
:
'Government and International Politics'
,
}),
# name of minor(s)
# are you in the honors college?
# current semester
'name'
:
TextInput
(
attrs
=
{
'class'
:
'form-control'
,
'placeholder'
=
'Software Engineering'
,
}),
}
# class CreateTrajectoryForm ( ModelForm ):
# class StudentInfoForm( ModelForm ):
advisor/trajectories/models.py
View file @
05f916f4
...
...
@@ -80,9 +80,10 @@ class Program(BaseModel):
# courseCollections
courseReqs
=
models
.
ManyToManyField
(
'CourseCollection'
,)
isHonors
=
models
.
BooleanField
(
False
),
# is BA, BS, Honors
# 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
)
# major or minor or gened
...
...
@@ -110,13 +111,15 @@ class Student(models.Model):
user
=
models
.
OneToOneField
(
User
)
# does User have a slug field?
# aka username, etc should all be here
# all of the student's trajectories
trajectory
=
models
.
ManyToManyField
(
'Trajectory'
,
null
=
True
)
# a big ol' list of courses the student has already completed
completedCourses
=
models
.
ManyToManyField
(
'Course'
,
null
=
True
)
# aka username, etc should all be here
semester
=
models
.
IntegerField
()
class
Meta
:
ordering
=
(
'user'
,)
...
...
advisor/trajectories/templates/new.html
View file @
05f916f4
...
...
@@ -24,6 +24,7 @@ start visualizing your way to completing your degree.</h4></p>
{% csrf_token %}
<fieldset>
<!-- move to a user manage page form -->
<legend>
Select your courses(s).
</legend>
{% if courses %}
<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>
<button
type=
"button"
class=
"btn btn-primary"
>
+
</button>
</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>
<div
class=
"form-group"
>
<label
for
"
honorscollege
"
class=
"col-sm-2"
>
Honors
</label>
...
...
@@ -83,7 +84,7 @@ start visualizing your way to completing your degree.</h4></p>
</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>
<div
class=
"form-group"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment