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
a239f146
Commit
a239f146
authored
Mar 04, 2023
by
KaoruSawade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made Dashboard views.py display the data from models Department and WidgetUser
parent
bafb184a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
views.cpython-311.pyc
...intupoltrobol/dashboard/__pycache__/views.cpython-311.pyc
+0
-0
dashboard.html
...ntupoltrobol/dashboard/templates/dashboard/dashboard.html
+5
-0
views.py
widget_quintupoltrobol/dashboard/views.py
+5
-2
No files found.
widget_quintupoltrobol/dashboard/__pycache__/views.cpython-311.pyc
View file @
a239f146
No preview for this file type
widget_quintupoltrobol/dashboard/templates/dashboard/dashboard.html
0 → 100644
View file @
a239f146
<p>
Welcome to Widget!
</p>
<p>
WIDGET USERS:
<br>
{% for user in widgetusers %}
{{user.last_name}}, {{user.first_name}} {{user.middle_name}}: {{user.department.dept_name}}, {{user.department.home_unit}}
<br>
{% endfor %}
widget_quintupoltrobol/dashboard/views.py
View file @
a239f146
from
django.shortcuts
import
render
from
django.http
import
HttpResponse
from
.models
import
Department
,
WidgetUser
def
pageview
(
request
):
return
HttpResponse
()
departments
=
Department
.
objects
.
all
()
widgetusers
=
WidgetUser
.
objects
.
all
()
return
render
(
request
,
'dashboard/dashboard.html'
,
{
'departments'
:
departments
,
'widgetusers'
:
widgetusers
})
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