Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
final_quintupoltrobol
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
Matthew Karl David P. Arpas
final_quintupoltrobol
Commits
6c4e976c
Commit
6c4e976c
authored
May 13, 2023
by
Albert Gagalac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added new .html files + implemented assignment-detail.html features
parent
16b73a14
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
8 deletions
+33
-8
assignment-add.html
...bol/assignments/templates/assignments/assignment-add.html
+0
-0
assignment-details.html
...assignments/templates/assignments/assignment-details.html
+12
-0
assignment-edit.html
...ol/assignments/templates/assignments/assignment-edit.html
+0
-0
assignments.html
...trobol/assignments/templates/assignments/assignments.html
+6
-3
urls.py
widget_quintupoltrobol/assignments/urls.py
+3
-2
views.py
widget_quintupoltrobol/assignments/views.py
+12
-3
No files found.
widget_quintupoltrobol/assignments/templates/assignments/assignment-add.html
0 → 100644
View file @
6c4e976c
widget_quintupoltrobol/assignments/templates/assignments/assignment-details.html
0 → 100644
View file @
6c4e976c
{% extends 'base.html' %}
{% load static %}
{% block title %} {{assignment}} {% endblock %}
{% block content %}
<h2>
{{assignment}}
</h2>
<h3>
{{assignment.course}}
</h3>
<p>
Description: {{assignment.description}}
<br>
Perfect Score: {{assignment.perfect_score}}
<br>
Passing Score: {{assignment.passing_score}}
<br>
</p>
{% endblock %}
\ No newline at end of file
widget_quintupoltrobol/assignments/templates/assignments/assignment-edit.html
0 → 100644
View file @
6c4e976c
widget_quintupoltrobol/assignments/templates/assignments/assignments.html
View file @
6c4e976c
<p>
{{"Widget's Assignments Page"}}
<br><br></p>
{% extends 'base.html' %}
{% load static %}
{% block content %}
<h2>
{{assignment.name}}
</h2>
<h3>
{{assignment.course}}
</h3>
{% for data in assignment %}
{% for data in assignment %}
<p>
<p>
Assignment name: {{data.name}}
<br>
Description: {{data.description}}
<br>
Description: {{data.description}}
<br>
Perfect Score: {{data.perfect_score}}
<br>
Perfect Score: {{data.perfect_score}}
<br>
Passing Score: {{data.passing_score}}
<br>
Passing Score: {{data.passing_score}}
<br>
Course/Section: {{data.course}}
<br>
</p>
</p>
{% endfor %}
{% endfor %}
{% endblock %}
\ No newline at end of file
widget_quintupoltrobol/assignments/urls.py
View file @
6c4e976c
from
django.urls
import
path
from
django.urls
import
path
from
.views
import
pageview
from
.views
import
pageview
,
AssignmentDetailView
urlpatterns
=
[
urlpatterns
=
[
path
(
''
,
pageview
,
name
=
'pageview'
)
path
(
''
,
pageview
,
name
=
'pageview'
),
path
(
'<int:pk>/details'
,
AssignmentDetailView
.
as_view
(),
name
=
'assignment-details'
)
]
]
app_name
=
"assignments"
app_name
=
"assignments"
\ No newline at end of file
widget_quintupoltrobol/assignments/views.py
View file @
6c4e976c
from
django.shortcuts
import
render
from
django.shortcuts
import
render
from
.models
import
Assignment
,
Course
from
.models
import
Assignment
,
Course
from
django.views.generic.detail
import
DetailView
from
django.views.generic.edit
import
CreateView
,
UpdateView
def
pageview
(
request
):
def
pageview
(
request
):
num
_assignment
=
Assignment
.
objects
.
all
()
all
_assignment
=
Assignment
.
objects
.
all
()
num
_course
=
Course
.
objects
.
all
()
all
_course
=
Course
.
objects
.
all
()
return
render
(
request
,
'assignments/assignments.html'
,
{
'assignment'
:
num_assignment
,
'course'
:
num_course
})
return
render
(
request
,
'assignments/assignments.html'
,
{
'assignment'
:
all_assignment
,
'course'
:
all_course
})
class
AssignmentDetailView
(
DetailView
):
def
get
(
self
,
request
,
pk
):
assignment
=
Assignment
.
objects
.
get
(
pk
=
pk
)
course
=
assignment
.
course
return
render
(
request
,
'assignments/assignment-details.html'
,
{
'assignment'
:
assignment
,
'course'
:
course
})
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