Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_group17
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
Vaughn Nephi Fajardo
widget_group17
Commits
7ad2ce8d
Commit
7ad2ce8d
authored
Apr 05, 2022
by
Joan Denise Nocos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: modified assignments view to display assignments and their associated courses
parent
7a35f9eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
views.cpython-39.pyc
widget_group_17/assignments/__pycache__/views.cpython-39.pyc
+0
-0
views.py
widget_group_17/assignments/views.py
+14
-1
db.sqlite3
widget_group_17/db.sqlite3
+0
-0
No files found.
widget_group_17/assignments/__pycache__/views.cpython-39.pyc
View file @
7ad2ce8d
No preview for this file type
widget_group_17/assignments/views.py
View file @
7ad2ce8d
from
django.http
import
HttpResponse
from
assignments.models
import
Assignment
,
Course
# Create your views here.
def
index
(
request
):
return
HttpResponse
(
"This is the Assignments page!"
)
\ No newline at end of file
assignments_view
=
"ASSIGNMENTS: "
schoolwork
=
Assignment
.
objects
.
all
()
for
assignment
in
schoolwork
:
assignments_view
+=
"Assignment Name: {}<br>Description: {}<br>Perfect Score: {}<br>Passing Score: {}<br>Course/Section: {} {} {}<br><br>"
format
(
assignment
.
name
,
assignment
.
description
,
assignment
.
max_points
,
assignment
.
passing_score
,
assignment
.
course
.
course_code
,
assignment
.
course
.
course_title
,
assignment
.
course
.
section
)
return
HttpResponse
(
assignments_view
)
\ No newline at end of file
widget_group_17/db.sqlite3
View file @
7ad2ce8d
No preview for this file type
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