Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
midterm_OhMyBash
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
Nheo Samson
midterm_OhMyBash
Commits
57662278
Commit
57662278
authored
Mar 05, 2023
by
Elaiza Bolislis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified views.py to improve code formatting
parent
ee93308a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
views.cpython-310.pyc
widget_OhMyBash/dashboard/__pycache__/views.cpython-310.pyc
+0
-0
views.py
widget_OhMyBash/dashboard/views.py
+2
-3
No files found.
widget_OhMyBash/dashboard/__pycache__/views.cpython-310.pyc
View file @
57662278
No preview for this file type
widget_OhMyBash/dashboard/views.py
View file @
57662278
...
...
@@ -4,9 +4,8 @@ from .models import Department, WidgetUser
def
index
(
request
):
return_string
=
'<p>Welcome to Widget!</p>
WIDGET USERS:<ul style="list-style: none; padding: 0; margin: 0;"
>'
return_string
=
'<p>Welcome to Widget!</p>
WIDGET USERS:<br
>'
for
user
in
WidgetUser
.
objects
.
all
():
return_string
+=
'<li>{}: {}</li>'
.
format
(
user
,
user
.
department
)
return_string
+=
'</ul>'
return_string
+=
'{}: {}<br>'
.
format
(
user
,
user
.
department
)
html_string
=
'<html><body>{}</body></html>'
.
format
(
return_string
)
return
HttpResponse
(
html_string
)
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