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
312176d1
Commit
312176d1
authored
Mar 05, 2023
by
Jose Gabriel L. Salas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed views.py formatting
parent
d913f342
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
11 deletions
+10
-11
db.sqlite3
widget_OhMyBash/db.sqlite3
+0
-0
admin.cpython-310.pyc
...hMyBash/widget_calendar/__pycache__/admin.cpython-310.pyc
+0
-0
models.cpython-310.pyc
...MyBash/widget_calendar/__pycache__/models.cpython-310.pyc
+0
-0
views.cpython-310.pyc
...hMyBash/widget_calendar/__pycache__/views.cpython-310.pyc
+0
-0
admin.py
widget_OhMyBash/widget_calendar/admin.py
+4
-4
models.py
widget_OhMyBash/widget_calendar/models.py
+1
-1
views.py
widget_OhMyBash/widget_calendar/views.py
+5
-6
No files found.
widget_OhMyBash/db.sqlite3
View file @
312176d1
No preview for this file type
widget_OhMyBash/widget_calendar/__pycache__/admin.cpython-310.pyc
View file @
312176d1
No preview for this file type
widget_OhMyBash/widget_calendar/__pycache__/models.cpython-310.pyc
View file @
312176d1
No preview for this file type
widget_OhMyBash/widget_calendar/__pycache__/views.cpython-310.pyc
View file @
312176d1
No preview for this file type
widget_OhMyBash/widget_calendar/admin.py
View file @
312176d1
widget_OhMyBash/widget_calendar/models.py
View file @
312176d1
widget_OhMyBash/widget_calendar/views.py
View file @
312176d1
...
...
@@ -4,21 +4,20 @@ from .models import Event, Location
def
index
(
request
):
return_string
=
"<p>Widget's Calendar of Activities</p>
<ul style='list-style: none; padding: 0; margin: 0;'>
"
return_string
=
"<p>Widget's Calendar of Activities</p>"
for
events
in
Event
.
objects
.
all
():
round_hours
=
(
"{:0.0f}"
.
format
(
events
.
estimated_hours
))
return_string
+=
'
<li>
Date and Time: {}<br>'
.
format
(
return_string
+=
'Date and Time: {}<br>'
.
format
(
events
.
target_datetime
.
strftime
(
'
%
m/
%
d/
%
Y,
%
H:
%
M
%
p'
)
)
return_string
+=
'Activity: {}<br>'
.
format
(
events
.
activity
)
return_string
+=
'Estimated Hours: {}<br>'
.
format
(
round_hours
)
return_string
+=
'Course/Section: {}<br>'
.
format
(
events
.
course
)
return_string
+=
'Mode: {}<br>'
.
format
(
events
.
location
.
mode
)
return_string
+=
'Venue: {}<br>
</li>
'
.
format
(
events
.
location
.
venue
)
return_string
+=
'Venue: {}<br>'
.
format
(
events
.
location
.
venue
)
return_string
+=
'<br>'
return_string
+=
'</ul>'
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