Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_group 6
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
Patricia Isabella Nava
widget_group 6
Commits
ee45a46d
Commit
ee45a46d
authored
May 27, 2022
by
Patricia Isabella Nava
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'nava/assignments'
parents
8571a8b1
4621be9b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
9 deletions
+16
-9
detail.html
widget_group_6/assignments/templates/assignments/detail.html
+3
-3
urls.py
widget_group_6/assignments/urls.py
+2
-1
views.py
widget_group_6/assignments/views.py
+11
-5
No files found.
widget_group_6/assignments/templates/assignments/detail.html
View file @
ee45a46d
...
@@ -3,11 +3,11 @@
...
@@ -3,11 +3,11 @@
{% block content %}
{% block content %}
<h1>
{{assignment.course.course_code}} {{assignment.course.course_title}} {{assignment.course.section}}
</h1>
<h1>
{{assignment.course.course_code}} {{assignment.course.course_title}} {{assignment.course.section}}
</h1>
<p>
<p
id =
"detail"
>
{{assignment.name}}
<br>
{{assignment.name}}
<br>
{{assignment.description}}
<br>
{{assignment.description}}
<br>
{{assignment.max_points}}
<br>
Highest Possible Score:
{{assignment.max_points}}
<br>
{{assignment.passing_score}}
<br>
Passing Score:
{{assignment.passing_score}}
<br>
{% if assignment.image %}
{% if assignment.image %}
<img
src=
"{{ assignment.image.url }}"
>
<img
src=
"{{ assignment.image.url }}"
>
...
...
widget_group_6/assignments/urls.py
View file @
ee45a46d
from
django.urls
import
path
,
include
from
django.urls
import
path
,
include
from
.
import
views
from
.
import
views
from
.views
import
AssignmentsPageView
urlpatterns
=
[
urlpatterns
=
[
path
(
''
,
views
.
index
,
name
=
'index'
),
path
(
''
,
AssignmentsPageView
.
as_view
()
,
name
=
'index'
),
#assignments/1/details
#assignments/1/details
path
(
"<int:assignment_id>/details/"
,
views
.
detail
,
name
=
'detail'
),
path
(
"<int:assignment_id>/details/"
,
views
.
detail
,
name
=
'detail'
),
#assignments/add
#assignments/add
...
...
widget_group_6/assignments/views.py
View file @
ee45a46d
from
msilib.schema
import
ListView
from
unicodedata
import
name
from
unicodedata
import
name
from
django.http
import
Http404
,
HttpResponse
from
django.http
import
Http404
,
HttpResponse
from
django.shortcuts
import
render
,
redirect
from
django.shortcuts
import
render
,
redirect
from
django.views
import
View
from
.models
import
Course
,
Assignment
from
.models
import
Course
,
Assignment
from
.forms
import
AssignmentForm
from
.forms
import
AssignmentForm
# Create your views here.
# Create your views here.
def
index
(
request
):
class
AssignmentsPageView
(
View
):
def
get
(
self
,
request
):
course_list
=
Course
.
objects
.
order_by
(
"course_code"
)
course_list
=
Course
.
objects
.
order_by
(
"course_code"
)
context
=
{
context
=
{
'course_list'
:
course_list
'course_list'
:
course_list
}
}
return
render
(
request
,
"assignments/index.html"
,
context
)
return
render
(
request
,
'assignments/index.html'
,
context
)
def
detail
(
request
,
assignment_id
):
def
detail
(
request
,
assignment_id
):
try
:
try
:
...
...
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