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
658f2a80
Commit
658f2a80
authored
Dec 07, 2013
by
Daniel W Bond
Browse files
killed some syntax screwups
parent
7dc2fdb7
Changes
3
Hide whitespace changes
Inline
Side-by-side
advisor/settings/settings.py
View file @
658f2a80
...
...
@@ -36,6 +36,8 @@ INSTALLED_APPS = (
'django.contrib.sessions'
,
'django.contrib.messages'
,
'django.contrib.staticfiles'
,
'trajectories'
,
'south'
,
)
MIDDLEWARE_CLASSES
=
(
...
...
advisor/settings/settings.pyc
View file @
658f2a80
No preview for this file type
advisor/trajectories/models.py
View file @
658f2a80
from
django.db
import
models
class
BaseModel
(
models
.
Model
):
created
=
models
.
DateTimeField
(
'Created'
,
auto_now_add
=
True
,
editable
=
False
)
_
created
=
models
.
DateTimeField
(
'Created'
,
auto_now_add
=
True
,
editable
=
False
)
last_modified
=
models
.
DateTimeField
(
'Last Modified'
,
auto_now
=
True
)
name
=
models
.
CharField
(
max_length
=
100
)
...
...
@@ -44,21 +44,21 @@ class Course(BaseModel):
class
CourseCollection
(
BaseModel
):
# a number of courses
courses
=
ManyToManyField
(
'Course'
)
courses
=
models
.
ManyToManyField
(
'Course'
)
# how many of those are required
numberOfCoursesReq
=
IntegerField
()
numberOfCoursesReq
=
models
.
IntegerField
()
class
Program
(
BaseModel
):
# courseCollections
courseReqs
=
ManyToManyField
(
'CourseCollection'
)
courseReqs
=
models
.
ManyToManyField
(
'CourseCollection'
)
# major or minor or gened
programType
=
models
.
CharField
()
programType
=
models
.
CharField
(
max_length
=
25
)
# is BA, BS, Honors
degreeType
=
models
.
CharField
()
degreeType
=
models
.
CharField
(
max_length
=
25
)
class
Meta
:
ordering
=
(
'name'
,)
...
...
@@ -70,7 +70,7 @@ class Program(BaseModel):
class
Student
(
BaseModel
):
alreadyTaken
=
models
.
ManyToManyField
(
'Course'
)
trajectory
=
models
.
ManyToField
(
'Trajectory'
)
trajectory
=
models
.
ManyTo
Many
Field
(
'Trajectory'
)
# aka username, etc should all be here
...
...
@@ -83,6 +83,7 @@ class Student(BaseModel):
return
self
.
name
def
get_absolute_url
(
self
):
return
self
.
name
class
Trajectory
(
BaseModel
):
...
...
@@ -98,4 +99,4 @@ class Trajectory(BaseModel):
def
get_absolute_url
(
self
):
return
'my-trajectories/%s/'
%
self
.
slug
return
'/%s/'
%
self
.
slug
return
'/%s/'
%
self
.
slug
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