Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_aguandhischipmunks
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
Adrian Lance Damalerio
midterm_aguandhischipmunks
Commits
9e45f431
Commit
9e45f431
authored
May 13, 2023
by
Deokhyun Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
url pattern for details updated
parent
f5883d1f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
6 deletions
+13
-6
assignment-add.html
...andhischipmunks/assignments/templates/assignment-add.html
+0
-0
assignment-details.html
...ischipmunks/assignments/templates/assignment-details.html
+4
-4
urls.py
widget_aguandhischipmunks/assignments/urls.py
+1
-0
views.py
widget_aguandhischipmunks/assignments/views.py
+8
-2
No files found.
widget_aguandhischipmunks/assignments/templates/assignment-add.html
0 → 100644
View file @
9e45f431
widget_aguandhischipmunks/assignments/templates/assignment
s
-details.html
→
widget_aguandhischipmunks/assignments/templates/assignment-details.html
View file @
9e45f431
...
...
@@ -14,15 +14,15 @@
<ul>
<h2>
{{assignment.course.code}} {{assignment.course.title}} - {{assignment.course.section}}
</h2>
<br>
<
h2>
Description: {{assignment.description}}
</h2
><br>
<
h2>
Description: {{assignment.description}}
</h2
><br>
<
h2>
Description: {{assignment.description}}
</h2
><br>
<
p>
Description: {{assignment.description}}
</p
><br>
<
p>
Perfect Score: {{assignment.perfect_score}}
</p
><br>
<
p>
Passing Score: {{assignment.passing_score}}
</p
><br>
</ul>
{% else %}
<p>
No Available Books.
</p>
{% endif %}
<ul>
<li
><button
type=
"button"
onclick=
"window.location.href='/assignments/{{assignment
s
.pk}}/edit'"
>
Edit Assignments
</button></li>
<li
><button
type=
"button"
onclick=
"window.location.href='/assignments/{{assignment.pk}}/edit'"
>
Edit Assignments
</button></li>
</ul>
{% endblock %}
\ No newline at end of file
widget_aguandhischipmunks/assignments/urls.py
View file @
9e45f431
...
...
@@ -4,4 +4,5 @@ from . import views
# url for assignments
urlpatterns
=
[
path
(
''
,
views
.
assignments_view
,
name
=
'assignment'
),
path
(
'<int:pk>/details'
,
views
.
AssignmentDetailView
.
as_view
(),
name
=
'assignment_detail'
),
]
\ No newline at end of file
widget_aguandhischipmunks/assignments/views.py
View file @
9e45f431
from
django.shortcuts
import
render
from
.models
import
Assignment
from
django.views.generic
import
DetailView
# assignment view for FBV implementation.
def
assignments_view
(
request
):
assignments
=
Assignment
.
objects
.
all
()
.
order_by
(
'id'
)
return
render
(
request
,
'assignments.html'
,
{
'assignments'
:
assignments
})
\ No newline at end of file
return
render
(
request
,
'assignments.html'
,
{
'assignments'
:
assignments
})
# assignement Detail view for CBV implementation.
class
AssignmentDetailView
(
DetailView
):
model
=
Assignment
template_name
=
'assignment-details.html'
context_object_name
=
'assignment'
\ No newline at end of file
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