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
SRCT
advisor
Commits
eeace88f
Commit
eeace88f
authored
Mar 02, 2014
by
Daniel W Bond
Browse files
Merge branch 'master' of github.com:srct/advisor
parents
521ca2e7
aabc9f8d
Changes
3
Hide whitespace changes
Inline
Side-by-side
advisor/mainapp/admin.py
View file @
eeace88f
...
...
@@ -10,30 +10,36 @@ class StudentAdmin(admin.ModelAdmin):
class
CourseAdmin
(
admin
.
ModelAdmin
):
search_fields
=
[
'dept'
,
'courseid'
]
filter_horizontal
=
(
'prerequisites'
,
'corequisites'
,)
class
CourseGroupAdmin
(
admin
.
ModelAdmin
):
search_fields
=
[
'name'
]
filter_horizontal
=
(
'courses'
,)
class
MajorAdmin
(
admin
.
ModelAdmin
):
search_fields
=
[
'name'
]
filter_horizontal
=
(
'requirements'
,
'concentrations'
,)
class
MinorAdmin
(
admin
.
ModelAdmin
):
search_fields
=
[
'name'
]
filter_horizontal
=
(
'requirements'
,)
class
GenEdAdmin
(
admin
.
ModelAdmin
):
search_fields
=
[
'name'
]
filter_horizontal
=
(
'requirements'
,)
class
ConcentrationAdmin
(
admin
.
ModelAdmin
):
search_fields
=
[
'name'
]
filter_horizontal
=
(
'requirements'
,)
class
RequirementAdmin
(
admin
.
ModelAdmin
):
pass
filter_horizontal
=
(
'courses'
,)
admin
.
site
.
register
(
Student
,
StudentAdmin
)
...
...
advisor/mainapp/migrations/0012_auto__add_field_requirement_catalogyear.py
0 → 100644
View file @
eeace88f
# -*- coding: utf-8 -*-
from
south.utils
import
datetime_utils
as
datetime
from
south.db
import
db
from
south.v2
import
SchemaMigration
from
django.db
import
models
class
Migration
(
SchemaMigration
):
def
forwards
(
self
,
orm
):
# Adding field 'Requirement.catalogyear'
db
.
add_column
(
u
'mainapp_requirement'
,
'catalogyear'
,
self
.
gf
(
'django.db.models.fields.IntegerField'
)(
default
=
20132014
),
keep_default
=
False
)
def
backwards
(
self
,
orm
):
# Deleting field 'Requirement.catalogyear'
db
.
delete_column
(
u
'mainapp_requirement'
,
'catalogyear'
)
models
=
{
u
'auth.group'
:
{
'Meta'
:
{
'object_name'
:
'Group'
},
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'unique'
:
'True'
,
'max_length'
:
'80'
}),
'permissions'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'to'
:
u
"orm['auth.Permission']"
,
'symmetrical'
:
'False'
,
'blank'
:
'True'
})
},
u
'auth.permission'
:
{
'Meta'
:
{
'ordering'
:
"(u'content_type__app_label', u'content_type__model', u'codename')"
,
'unique_together'
:
"((u'content_type', u'codename'),)"
,
'object_name'
:
'Permission'
},
'codename'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
}),
'content_type'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
u
"orm['contenttypes.ContentType']"
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'50'
})
},
u
'auth.user'
:
{
'Meta'
:
{
'object_name'
:
'User'
},
'date_joined'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'email'
:
(
'django.db.models.fields.EmailField'
,
[],
{
'max_length'
:
'75'
,
'blank'
:
'True'
}),
'first_name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'30'
,
'blank'
:
'True'
}),
'groups'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'symmetrical'
:
'False'
,
'related_name'
:
"u'user_set'"
,
'blank'
:
'True'
,
'to'
:
u
"orm['auth.Group']"
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'is_active'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'True'
}),
'is_staff'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'False'
}),
'is_superuser'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'False'
}),
'last_login'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'last_name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'30'
,
'blank'
:
'True'
}),
'password'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'128'
}),
'user_permissions'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'symmetrical'
:
'False'
,
'related_name'
:
"u'user_set'"
,
'blank'
:
'True'
,
'to'
:
u
"orm['auth.Permission']"
}),
'username'
:
(
'django.db.models.fields.CharField'
,
[],
{
'unique'
:
'True'
,
'max_length'
:
'30'
})
},
u
'contenttypes.contenttype'
:
{
'Meta'
:
{
'ordering'
:
"('name',)"
,
'unique_together'
:
"(('app_label', 'model'),)"
,
'object_name'
:
'ContentType'
,
'db_table'
:
"'django_content_type'"
},
'app_label'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'model'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
}),
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
})
},
u
'mainapp.advisoradminuser'
:
{
'Meta'
:
{
'object_name'
:
'AdvisorAdminUser'
},
'created'
:
(
'model_utils.fields.AutoCreatedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'department'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'50'
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'modified'
:
(
'model_utils.fields.AutoLastModifiedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'user'
:
(
'django.db.models.fields.related.OneToOneField'
,
[],
{
'related_name'
:
"'advisorname'"
,
'unique'
:
'True'
,
'to'
:
u
"orm['auth.User']"
})
},
u
'mainapp.buildresponse'
:
{
'Meta'
:
{
'object_name'
:
'BuildResponse'
},
'created'
:
(
'model_utils.fields.AutoCreatedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'modified'
:
(
'model_utils.fields.AutoLastModifiedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'programs'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'to'
:
u
"orm['mainapp.Program']"
,
'symmetrical'
:
'False'
}),
'semester'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
u
"orm['mainapp.Semester']"
})
},
u
'mainapp.concentration'
:
{
'Meta'
:
{
'object_name'
:
'Concentration'
,
'_ormbases'
:
[
u
'mainapp.Program'
]},
'associatedmajors'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
u
"orm['mainapp.Major']"
,
'null'
:
'True'
}),
u
'program_ptr'
:
(
'django.db.models.fields.related.OneToOneField'
,
[],
{
'to'
:
u
"orm['mainapp.Program']"
,
'unique'
:
'True'
,
'primary_key'
:
'True'
})
},
u
'mainapp.course'
:
{
'Meta'
:
{
'object_name'
:
'Course'
,
'_ormbases'
:
[
u
'mainapp.MetaCourse'
]},
'corequisites'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'symmetrical'
:
'False'
,
'related_name'
:
"'coreq+'"
,
'blank'
:
'True'
,
'to'
:
u
"orm['mainapp.MetaCourse']"
}),
'courseid'
:
(
'django.db.models.fields.IntegerField'
,
[],
{}),
'credits'
:
(
'django.db.models.fields.IntegerField'
,
[],
{}),
'dept'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'10'
}),
u
'metacourse_ptr'
:
(
'django.db.models.fields.related.OneToOneField'
,
[],
{
'to'
:
u
"orm['mainapp.MetaCourse']"
,
'unique'
:
'True'
,
'primary_key'
:
'True'
}),
'prerequisites'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'symmetrical'
:
'False'
,
'related_name'
:
"'prereq+'"
,
'blank'
:
'True'
,
'to'
:
u
"orm['mainapp.MetaCourse']"
}),
'uniqname'
:
(
'django.db.models.fields.CharField'
,
[],
{
'unique'
:
'True'
,
'max_length'
:
'20'
})
},
u
'mainapp.coursegroup'
:
{
'Meta'
:
{
'object_name'
:
'CourseGroup'
,
'_ormbases'
:
[
u
'mainapp.MetaCourse'
]},
'courses'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'to'
:
u
"orm['mainapp.Course']"
,
'symmetrical'
:
'False'
}),
u
'metacourse_ptr'
:
(
'django.db.models.fields.related.OneToOneField'
,
[],
{
'to'
:
u
"orm['mainapp.MetaCourse']"
,
'unique'
:
'True'
,
'primary_key'
:
'True'
}),
'numneeded'
:
(
'django.db.models.fields.IntegerField'
,
[],
{})
},
u
'mainapp.gened'
:
{
'Meta'
:
{
'object_name'
:
'GenEd'
,
'_ormbases'
:
[
u
'mainapp.Program'
]},
u
'program_ptr'
:
(
'django.db.models.fields.related.OneToOneField'
,
[],
{
'to'
:
u
"orm['mainapp.Program']"
,
'unique'
:
'True'
,
'primary_key'
:
'True'
})
},
u
'mainapp.major'
:
{
'Meta'
:
{
'object_name'
:
'Major'
,
'_ormbases'
:
[
u
'mainapp.Program'
]},
'concentrations'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'symmetrical'
:
'False'
,
'to'
:
u
"orm['mainapp.Concentration']"
,
'null'
:
'True'
,
'blank'
:
'True'
}),
'gened'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
u
"orm['mainapp.GenEd']"
,
'null'
:
'True'
,
'blank'
:
'True'
}),
u
'program_ptr'
:
(
'django.db.models.fields.related.OneToOneField'
,
[],
{
'to'
:
u
"orm['mainapp.Program']"
,
'unique'
:
'True'
,
'primary_key'
:
'True'
})
},
u
'mainapp.metacourse'
:
{
'Meta'
:
{
'object_name'
:
'MetaCourse'
},
'catalogyear'
:
(
'django.db.models.fields.IntegerField'
,
[],
{}),
'created'
:
(
'model_utils.fields.AutoCreatedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'description'
:
(
'django.db.models.fields.TextField'
,
[],
{
'blank'
:
'True'
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'modified'
:
(
'model_utils.fields.AutoLastModifiedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'slug'
:
(
'autoslug.fields.AutoSlugField'
,
[],
{
'unique_with'
:
'()'
,
'max_length'
:
'50'
,
'populate_from'
:
"'title'"
}),
'title'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'50'
})
},
u
'mainapp.minor'
:
{
'Meta'
:
{
'object_name'
:
'Minor'
,
'_ormbases'
:
[
u
'mainapp.Program'
]},
u
'program_ptr'
:
(
'django.db.models.fields.related.OneToOneField'
,
[],
{
'to'
:
u
"orm['mainapp.Program']"
,
'unique'
:
'True'
,
'primary_key'
:
'True'
})
},
u
'mainapp.program'
:
{
'Meta'
:
{
'object_name'
:
'Program'
},
'created'
:
(
'model_utils.fields.AutoCreatedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'description'
:
(
'django.db.models.fields.TextField'
,
[],
{
'blank'
:
'True'
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'modified'
:
(
'model_utils.fields.AutoLastModifiedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'50'
}),
'requirements'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'related_name'
:
"'reqs+'"
,
'symmetrical'
:
'False'
,
'to'
:
u
"orm['mainapp.Requirement']"
}),
'slug'
:
(
'autoslug.fields.AutoSlugField'
,
[],
{
'unique_with'
:
'()'
,
'max_length'
:
'50'
,
'populate_from'
:
"'name'"
})
},
u
'mainapp.requirement'
:
{
'Meta'
:
{
'object_name'
:
'Requirement'
},
'catalogyear'
:
(
'django.db.models.fields.IntegerField'
,
[],
{}),
'courses'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'to'
:
u
"orm['mainapp.MetaCourse']"
,
'symmetrical'
:
'False'
}),
'created'
:
(
'model_utils.fields.AutoCreatedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'modified'
:
(
'model_utils.fields.AutoLastModifiedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'50'
})
},
u
'mainapp.semester'
:
{
'Meta'
:
{
'object_name'
:
'Semester'
},
'courses'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'to'
:
u
"orm['mainapp.Course']"
,
'symmetrical'
:
'False'
,
'blank'
:
'True'
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'nextsemester'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
u
"orm['mainapp.Semester']"
,
'null'
:
'True'
,
'blank'
:
'True'
}),
'number'
:
(
'django.db.models.fields.IntegerField'
,
[],
{}),
'programs'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'to'
:
u
"orm['mainapp.Program']"
,
'symmetrical'
:
'False'
}),
'requirementssatisfied'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'symmetrical'
:
'False'
,
'related_name'
:
"'reqssatisfied+'"
,
'blank'
:
'True'
,
'to'
:
u
"orm['mainapp.Requirement']"
}),
'user'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
u
"orm['mainapp.Student']"
})
},
u
'mainapp.student'
:
{
'Meta'
:
{
'object_name'
:
'Student'
},
'advisorname'
:
(
'django.db.models.fields.related.OneToOneField'
,
[],
{
'to'
:
u
"orm['mainapp.AdvisorAdminUser']"
,
'unique'
:
'True'
,
'null'
:
'True'
,
'blank'
:
'True'
}),
'coursestaken'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'symmetrical'
:
'False'
,
'to'
:
u
"orm['mainapp.Course']"
,
'null'
:
'True'
,
'blank'
:
'True'
}),
'created'
:
(
'model_utils.fields.AutoCreatedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'dateOfGrad'
:
(
'django.db.models.fields.DateField'
,
[],
{}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'modified'
:
(
'model_utils.fields.AutoLastModifiedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'programs'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'to'
:
u
"orm['mainapp.Program']"
,
'symmetrical'
:
'False'
}),
'slug'
:
(
'autoslug.fields.AutoSlugField'
,
[],
{
'max_length'
:
'50'
,
'unique_with'
:
'()'
,
'null'
:
'True'
,
'populate_from'
:
"'user'"
}),
'trajectory'
:
(
'django.db.models.fields.related.OneToOneField'
,
[],
{
'to'
:
u
"orm['mainapp.Trajectory']"
,
'unique'
:
'True'
,
'null'
:
'True'
,
'blank'
:
'True'
}),
'user'
:
(
'django.db.models.fields.related.OneToOneField'
,
[],
{
'to'
:
u
"orm['auth.User']"
,
'unique'
:
'True'
})
},
u
'mainapp.trajectory'
:
{
'Meta'
:
{
'object_name'
:
'Trajectory'
},
'created'
:
(
'model_utils.fields.AutoCreatedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
u
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'modified'
:
(
'model_utils.fields.AutoLastModifiedField'
,
[],
{
'default'
:
'datetime.datetime.now'
}),
'semesters'
:
(
'django.db.models.fields.related.ManyToManyField'
,
[],
{
'to'
:
u
"orm['mainapp.Semester']"
,
'symmetrical'
:
'False'
}),
'user'
:
(
'django.db.models.fields.related.OneToOneField'
,
[],
{
'related_name'
:
"'trajectory'"
,
'unique'
:
'True'
,
'to'
:
u
"orm['auth.User']"
})
}
}
complete_apps
=
[
'mainapp'
]
\ No newline at end of file
advisor/mainapp/models.py
View file @
eeace88f
...
...
@@ -79,6 +79,7 @@ class Concentration(Program):
class
Requirement
(
TimeStampedModel
):
name
=
models
.
CharField
(
max_length
=
50
)
courses
=
models
.
ManyToManyField
(
'MetaCourse'
)
catalogyear
=
models
.
IntegerField
(
"Catalog Year"
)
def
__unicode__
(
self
):
return
'%s'
%
self
.
name
...
...
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