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
aa38d8f8
Commit
aa38d8f8
authored
Jan 26, 2014
by
Daniel W Bond
Browse files
a few tweaks to the models
parent
29944bc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
advisor/trajectories/models.py
View file @
aa38d8f8
...
...
@@ -59,6 +59,7 @@ class CourseCollection(BaseModel):
# how many of those are required
numReq
=
models
.
IntegerField
()
# if the course collection's numreq is met
isCompleted
=
models
.
BooleanField
(
False
)
class
Program
(
BaseModel
):
...
...
@@ -72,8 +73,12 @@ class Program(BaseModel):
programType
=
models
.
CharField
(
max_length
=
25
)
# is BA, BS, Honors
degreeType
=
models
.
CharField
(
max_length
=
25
)
# 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
)
# if all coursecollections' and gened requirements are satisfied, then the
# program is completed
isCompleted
=
models
.
BooleanField
(
False
)
class
Meta
:
...
...
@@ -87,8 +92,10 @@ class Student(models.Model):
user
=
models
.
OneToOneField
(
User
)
# the student's already-completed classes, the root of the trajectory tree
alreadyTaken
=
models
.
ManyToManyField
(
'Course'
,
null
=
True
)
# all of the student's trajectories
trajectory
=
models
.
ManyToManyField
(
'Trajectory'
,
null
=
True
)
# aka username, etc should all be here
...
...
@@ -115,6 +122,11 @@ class Trajectory(BaseModel):
# Takes courses
previousCourses
=
models
.
ManyToManyField
(
'Trajectory'
,)
# the program(s) that this trajectory is completing
# CHECK VIEWS, MAKE SURE I DIDN'T ALREADY SOMEHOW ACCOUNT FOR THIS
forPrograms
=
models
.
ManyToManyField
(
'Program'
,)
# whether or not the trajectory can be seen by others
isPublic
=
models
.
BooleanField
()
# this isn't exactly done correctly-- ideally courses should be elements
...
...
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