Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_group 25
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Andre Matthew Dumandan
widget_group 25
Commits
9f4d9bb7
Commit
9f4d9bb7
authored
May 24, 2022
by
Earl Edison B. Felizardo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edited assignment views
parent
df2c11c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
18 deletions
+0
-18
views.py
widget_group_25/assignments/views.py
+0
-18
No files found.
widget_group_25/assignments/views.py
View file @
9f4d9bb7
...
@@ -11,15 +11,6 @@ class AssignmentsView(View):
...
@@ -11,15 +11,6 @@ class AssignmentsView(View):
assignments_list
=
Assignment
.
objects
.
order_by
(
"name"
)
assignments_list
=
Assignment
.
objects
.
order_by
(
"name"
)
return
render
(
request
,
"assignments/assignments_list.html"
,
{
"course_list"
:
course_list
,
"assignments_list"
:
assignments_list
})
return
render
(
request
,
"assignments/assignments_list.html"
,
{
"course_list"
:
course_list
,
"assignments_list"
:
assignments_list
})
# def index(request):
# course_list = Course.objects.order_by("course_code")
# assignments_list = Assignment.objects.order_by("name")
# context = {
# "course_list": course_list,
# "assignments_list": assignments_list,
# }
# return render(request, "assignments/assignments_list.html", context)
def
detail
(
request
,
pk
):
def
detail
(
request
,
pk
):
assignment
=
Assignment
.
objects
.
get
(
pk
=
pk
)
assignment
=
Assignment
.
objects
.
get
(
pk
=
pk
)
course
=
Course
.
objects
.
get
(
course_code__exact
=
assignment
.
course_code
)
course
=
Course
.
objects
.
get
(
course_code__exact
=
assignment
.
course_code
)
...
@@ -38,12 +29,3 @@ class AssignmentCreateView(CreateView):
...
@@ -38,12 +29,3 @@ class AssignmentCreateView(CreateView):
if
form
.
is_valid
():
if
form
.
is_valid
():
new_assignment
=
form
.
save
()
new_assignment
=
form
.
save
()
return
redirect
(
"assignments:add-assignment"
)
return
redirect
(
"assignments:add-assignment"
)
# def newassignment(request):
# if request.method == "POST":
# assignment_form = AssignmentForm(request.POST)
# if assignment_form.is_valid():
# new_assignment = assignment_form.save()
# return redirect("assignments:add-assignment")
# else:
# assignment_form = AssignmentForm()
# return render(request, "assignments/add_assignment.html", {"assignment_form": assignment_form})
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