Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm-group3
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 Michael T. Amador
midterm-group3
Commits
1e41567f
Commit
1e41567f
authored
Mar 02, 2023
by
Alvin Joshua Andrada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed datetime formats and updated references
parent
a536d1db
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
README.md
README.md
+7
-1
views.cpython-39.pyc
widget_group3/calendar_app/__pycache__/views.cpython-39.pyc
+0
-0
views.py
widget_group3/calendar_app/views.py
+10
-4
No files found.
README.md
View file @
1e41567f
...
...
@@ -22,7 +22,13 @@ Fausto - Dashboard App
This project was accomplished truthfully only by the people whose names are listed above.
(lol di ko alam please check - alvin)
# list of references used; and
# list of references used;
Queries - Django Documentation
https://docs.djangoproject.com/en/4.1/topics/db/queries/#retrieving-a-single-object-with-get
Datetime Import
https://docs.python.org/3/library/datetime.html
# members’ signatures in the form (sgd) your complete name, date
John Michael T. Amador (sgd) February 28, 2023
...
...
widget_group3/calendar_app/__pycache__/views.cpython-39.pyc
View file @
1e41567f
No preview for this file type
widget_group3/calendar_app/views.py
View file @
1e41567f
#Reference: Queries - Django Documentation
# https://docs.djangoproject.com/en/4.1/topics/db/queries/#retrieving-a-single-object-with-get
#References:
# Queries - Django Documentation
# https://docs.djangoproject.com/en/4.1/topics/db/queries/#retrieving-a-single-object-with-get
# Datetime Import
# https://docs.python.org/3/library/datetime.html
from
django.shortcuts
import
render
from
django.http
import
HttpResponse
from
.models
import
Event
,
Location
import
datetime
def
index
(
request
):
total_objects
=
Event
.
objects
.
count
()
...
...
@@ -17,7 +22,8 @@ def index(request):
def
display_details
(
index
):
#gets all the object's attributes
event
=
Event
.
objects
.
get
(
pk
=
index
)
date_time
=
event
.
target_datetime
date
=
event
.
target_datetime
.
date
()
.
strftime
(
"
%
m/
%
d/
%
Y"
)
time
=
event
.
target_datetime
.
time
()
.
strftime
(
"
%
I:
%
M
%
p"
)
activity
=
event
.
activity
estimated_hours
=
event
.
estimated_hours
# course_code = event.course.code
...
...
@@ -27,7 +33,7 @@ def display_details(index):
venue
=
event
.
location
.
venue
#arrange all the details
display
=
'Date and Time: {}
<br>'
.
format
(
date_
time
)
display
=
'Date and Time: {}
, {} <br>'
.
format
(
date
,
time
)
display
+=
'Activity: {} <br>'
.
format
(
activity
)
display
+=
'Estimated Hours {} <br>'
.
format
(
estimated_hours
)
display
+=
'Course/Section: {} {}-{} <br>'
#.format(course_code,course_title,section)
...
...
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