Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_group22
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
Norberto Tadeo
widget_group22
Commits
8397f814
Commit
8397f814
authored
Apr 04, 2022
by
John Tamano
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tamano/homepage'
parents
9182b7dc
e94f2504
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
0 deletions
+15
-0
models.cpython-38.pyc
widget_group22/homepage/__pycache__/models.cpython-38.pyc
+0
-0
urls.cpython-38.pyc
widget_group22/homepage/__pycache__/urls.cpython-38.pyc
+0
-0
views.cpython-38.pyc
widget_group22/homepage/__pycache__/views.cpython-38.pyc
+0
-0
views.py
widget_group22/homepage/views.py
+15
-0
No files found.
widget_group22/homepage/__pycache__/models.cpython-38.pyc
View file @
8397f814
No preview for this file type
widget_group22/homepage/__pycache__/urls.cpython-38.pyc
View file @
8397f814
No preview for this file type
widget_group22/homepage/__pycache__/views.cpython-38.pyc
View file @
8397f814
No preview for this file type
widget_group22/homepage/views.py
View file @
8397f814
from
tkinter
import
Widget
from
django.shortcuts
import
render
from
django.shortcuts
import
render
from
django.template.loader
import
get_template
from
django.template.loader
import
get_template
from
homepage.models
import
Department
,
WidgetUser
from
homepage.models
import
Department
,
WidgetUser
...
@@ -11,9 +12,23 @@ def index(request):
...
@@ -11,9 +12,23 @@ def index(request):
def
displayWidgetUsers
(
request
):
def
displayWidgetUsers
(
request
):
WidgetUsers
=
models
.
WidgetUser
.
objects
.
all
()
WidgetUsers
=
models
.
WidgetUser
.
objects
.
all
()
WidgetUserInfo
=
""
for
i
in
WidgetUsers
:
last_name
=
i
.
last_name
middle_name
=
i
.
middle_name
first_name
=
i
.
first_name
id_number
=
i
.
id_num
email
=
i
.
email
dept
=
str
(
i
.
department
)
home_unit
=
i
.
department
.
home_unit
temp
=
last_name
+
", "
+
first_name
+
" "
+
middle_name
+
": "
+
id_number
+
", "
+
email
+
", "
+
dept
+
", "
+
home_unit
WidgetUserInfo
+=
"<br>"
+
temp
return
HttpResponse
(
"WIDGET USERS:
\n
"
+
WidgetUserInfo
)
'''
WidgetUserTemplate = get_template('homepage.html')
WidgetUserTemplate = get_template('homepage.html')
display = WidgetUserTemplate.render({'displayWidgetUsers': WidgetUsers})
display = WidgetUserTemplate.render({'displayWidgetUsers': WidgetUsers})
return HttpResponse(display)
return HttpResponse(display)
'''
# Create your views here.
# Create your views here.
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