Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_robo_mommy
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Raul Jarod Conanan
midterm_robo_mommy
Commits
638bbd58
Commit
638bbd58
authored
Mar 06, 2023
by
RJC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed target_datetime to aware utc datetime
parent
244fd7c7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
models.py
widget_robo_mommy/widget_Calendar/models.py
+1
-1
views.py
widget_robo_mommy/widget_Calendar/views.py
+2
-1
No files found.
widget_robo_mommy/widget_Calendar/models.py
View file @
638bbd58
...
...
@@ -18,7 +18,7 @@ class Location(models.Model):
class
Event
(
models
.
Model
):
target_datetime
=
models
.
CharField
(
max_length
=
20
)
target_datetime
=
models
.
DateTimeField
(
)
activity
=
models
.
CharField
(
max_length
=
100
)
estimated_hours
=
models
.
FloatField
()
location
=
models
.
ForeignKey
(
...
...
widget_robo_mommy/widget_Calendar/views.py
View file @
638bbd58
from
.models
import
Event
,
Location
from
django.http
import
HttpResponse
from
forum.views
import
convert_utc_to_local
def
index
(
request
):
...
...
@@ -14,7 +15,7 @@ def index(request):
Mode: {}<br>
Venue: {}<br><br>
'''
.
format
(
eventItem
.
target_datetime
,
convert_utc_to_local
(
eventItem
.
target_datetime
,
'
%
d/
%
m/
%
Y|
%
I:
%
M
%
p'
)
,
eventItem
.
activity
,
eventItem
.
estimated_hours
,
eventItem
.
course
.
code
,
...
...
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