Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
advisor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
SRCT
advisor
Commits
bcd94256
Commit
bcd94256
authored
Mar 01, 2014
by
Daniel W Bond
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:srct/advisor
parents
d531a608
6efdd786
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
advisor/mainapp/apiviews.py
advisor/mainapp/apiviews.py
+26
-0
No files found.
advisor/mainapp/apiviews.py
0 → 100644
View file @
bcd94256
from
django.shortcuts
import
render
from
django.views.generic
import
CreateView
,
ListView
,
DetailView
,
DeleteView
,
UpdateView
from
rest_framework
import
viewsets
from
.models
import
Trajectory
,
Program
,
Major
,
Minor
,
GenEd
,
Concentration
,
MetaCourse
,
Course
,
CourseGroup
from
.serializers
import
ProgramSerializer
,
CourseSerializer
,
CourseGroupSerializer
,
TrajectorySerializer
class
ProgramViewSet
(
viewsets
.
ReadOnlyModelViewSet
):
queryset
=
Program
.
objects
.
all
()
serializer_class
=
ProgramSerializer
class
CourseSerializer
(
viewsets
.
ReadOnlyModelViewSet
):
queryset
=
Course
.
objects
.
all
()
serializer_class
=
CourseSerializer
class
CourseGroupSerializer
(
viewsets
.
ReadOnlyModelViewSet
):
queryset
=
CourseGroup
.
objects
.
all
()
serializer_class
=
CourseGroupSerializer
class
TrajectorySerializer
(
viewsets
.
ModelViewSet
):
queryset
=
Trajectory
.
objects
.
all
()
serializer_class
=
TrajectorySerializer
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