Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_casanatics
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
John Aidan Vincent M. Ng
midterm_casanatics
Commits
bc58a526
Commit
bc58a526
authored
May 04, 2023
by
justin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: shifted to using HTML templates for dashboard view
parent
7537a392
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
8 deletions
+24
-8
views.cpython-310.pyc
...et_casanatics/dashboard/__pycache__/views.cpython-310.pyc
+0
-0
dashboard.html
...t_casanatics/dashboard/templates/dashboard/dashboard.html
+12
-0
widgetuser-add.html
...anatics/dashboard/templates/dashboard/widgetuser-add.html
+0
-0
widgetuser-details.html
...ics/dashboard/templates/dashboard/widgetuser-details.html
+0
-0
widgetuser-edit.html
...natics/dashboard/templates/dashboard/widgetuser-edit.html
+0
-0
views.py
widget_casanatics/dashboard/views.py
+12
-8
No files found.
widget_casanatics/dashboard/__pycache__/views.cpython-310.pyc
View file @
bc58a526
No preview for this file type
widget_casanatics/dashboard/templates/dashboard/dashboard.html
0 → 100644
View file @
bc58a526
{% extends 'base.html' %}
{% block content %}
<h1>
Welcome to Widget!
</h1>
<h2>
Widget Users:
</h2>
<ul>
{% for user in users %}
<a
href=
""
>
<li>
{{ user.last_name }}, {{ user.first_name }}
</li>
</a>
{% endfor %}
</ul>
{% endblock %}
widget_casanatics/dashboard/templates/dashboard/widgetuser-add.html
0 → 100644
View file @
bc58a526
widget_casanatics/dashboard/templates/dashboard/widgetuser-details.html
0 → 100644
View file @
bc58a526
widget_casanatics/dashboard/templates/dashboard/widgetuser-edit.html
0 → 100644
View file @
bc58a526
widget_casanatics/dashboard/views.py
View file @
bc58a526
from
django.http
import
HttpResponse
from
.models
import
Department
,
WidgetUser
# from django.http import HttpResponse
from
.models
import
WidgetUser
from
django.shortcuts
import
render
def
dashboard
(
request
):
content
=
"Welcome to Widget! <br><br> WIDGET USERS: <br>"
# content = "Welcome to Widget! <br><br> WIDGET USERS: <br>"
# users = WidgetUser.objects.all()
#
# for user in users:
# content += str(user) + ": " + str(user.department) + "<br>"
#
# return HttpResponse(content)
users
=
WidgetUser
.
objects
.
all
()
for
user
in
users
:
content
+=
str
(
user
)
+
": "
+
str
(
user
.
department
)
+
"<br>"
return
HttpResponse
(
content
)
context
=
{
"users"
:
users
}
return
render
(
request
,
"dashboard/dashboard.html"
,
context
)
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