Commit 371335c0 authored by Ben Waters's avatar Ben Waters
Browse files

switching form names and view names. got rid of cbv for trajectory no need

parent f83e4d78
...@@ -32,7 +32,7 @@ class StyledSeachForm( SearchForm ): ...@@ -32,7 +32,7 @@ class StyledSeachForm( SearchForm ):
# name # name
# } # }
class NewTrajectoryForm( ModelForm ): class CreatePersonalProgramListForm( ModelForm ):
# def __init__(self, *args, **kwargs): # def __init__(self, *args, **kwargs):
class Meta: class Meta:
...@@ -90,6 +90,8 @@ class NewTrajectoryForm( ModelForm ): ...@@ -90,6 +90,8 @@ class NewTrajectoryForm( ModelForm ):
'placeholder' = 'Name Your Trajectory', 'placeholder' = 'Name Your Trajectory',
}), }),
} }
class BuildTrajectoryForm(ModelForm):
model = Trajectory
class StudentInfoForm( ModelForm ): class StudentInfoForm( ModelForm ):
# def __init__(self, *args, **kwargs): # def __init__(self, *args, **kwargs):
......
...@@ -6,10 +6,10 @@ from trajecgtories.utils import * ...@@ -6,10 +6,10 @@ from trajecgtories.utils import *
from braces.views import LoginRequiredMixin from braces.views import LoginRequiredMixin
# a page for creating new trajectories # a page for creating new trajectories
# @login_required @login_required
def create_trajectory(LoginRequiredMixin, CreateView): def new_list_of_programs(FormView):
model = Trajectory template_name = 'new.html'
form = CreateTrajectoryForm form = CreatePersonalProgramListForm
#programs = Program.objects.all() #programs = Program.objects.all()
#courses = Course.objects.all() #courses = Course.objects.all()
...@@ -18,7 +18,8 @@ def create_trajectory(LoginRequiredMixin, CreateView): ...@@ -18,7 +18,8 @@ def create_trajectory(LoginRequiredMixin, CreateView):
# "Build" # "Build"
def update_trajectory(LoginRequiredMixin, UpdateView): def update_trajectory(LoginRequiredMixin, UpdateView):
model = Trajectory model = Trajectory
form = UpdateTrajectoryForm form = BuildTrajectoryForm
template_name = 'build.html'
# student's page; shows saved trajectories # student's page; shows saved trajectories
# @login_required # @login_required
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment