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
a80f3f9c
Commit
a80f3f9c
authored
Mar 04, 2023
by
Javi Ng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed timezone issue for calendar, updated README sources
parent
ac174693
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
2 deletions
+4
-2
README.txt
README.txt
+1
-1
views.cpython-310.pyc
...casanatics/calendar_app/__pycache__/views.cpython-310.pyc
+0
-0
views.py
widget_casanatics/calendar_app/views.py
+3
-1
db.sqlite3
widget_casanatics/db.sqlite3
+0
-0
No files found.
README.txt
View file @
a80f3f9c
...
@@ -21,7 +21,7 @@ Submission Date: MM/DD/YYYY
...
@@ -21,7 +21,7 @@ Submission Date: MM/DD/YYYY
We truthfully completed this project (this project being Midterm Project: Widget v1). There are no lies because it is true.
We truthfully completed this project (this project being Midterm Project: Widget v1). There are no lies because it is true.
References:
References:
Wala pa naman
Date-time conversion to timezone in views: https://stackoverflow.com/questions/35072711/django-datetime-field-convert-to-timezone-in-view
(sgd) Angelo Joaquin B. Alvarez, 02/27/2023
(sgd) Angelo Joaquin B. Alvarez, 02/27/2023
(Sgd) Gabriel S. Limbaga, 02/28/2023
(Sgd) Gabriel S. Limbaga, 02/28/2023
...
...
widget_casanatics/calendar_app/__pycache__/views.cpython-310.pyc
View file @
a80f3f9c
No preview for this file type
widget_casanatics/calendar_app/views.py
View file @
a80f3f9c
from
django.shortcuts
import
render
from
django.shortcuts
import
render
from
django.http
import
HttpResponse
from
django.http
import
HttpResponse
from
.models
import
Event
from
.models
import
Event
from
django.utils
import
timezone
# Create your views here.
# Create your views here.
def
index
(
request
):
def
index
(
request
):
...
@@ -8,6 +9,7 @@ def index(request):
...
@@ -8,6 +9,7 @@ def index(request):
events
=
Event
.
objects
.
all
()
events
=
Event
.
objects
.
all
()
for
event
in
events
:
for
event
in
events
:
localdatetime
=
timezone
.
localtime
(
event
.
target_datetime
)
eventInfo
+=
'''
eventInfo
+=
'''
Date and Time: {} <br>
Date and Time: {} <br>
Activity: {} <br>
Activity: {} <br>
...
@@ -17,7 +19,7 @@ def index(request):
...
@@ -17,7 +19,7 @@ def index(request):
Venue: {} <br>
Venue: {} <br>
<br>
<br>
'''
.
format
(
'''
.
format
(
event
.
target_
datetime
.
strftime
(
"
%
m/
%
d/
%
Y,
%
I:
%
M
%
p"
),
local
datetime
.
strftime
(
"
%
m/
%
d/
%
Y,
%
I:
%
M
%
p"
),
event
.
activity
(),
event
.
activity
(),
event
.
estimated_hours
(),
event
.
estimated_hours
(),
event
.
course
.
code
(),
event
.
course
.
title
(),
event
.
course
.
section
(),
event
.
course
.
code
(),
event
.
course
.
title
(),
event
.
course
.
section
(),
...
...
widget_casanatics/db.sqlite3
View file @
a80f3f9c
No preview for this file type
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