Commit 2922be19 authored by Jan Ericsson Ong Ang's avatar Jan Ericsson Ong Ang

Edited date and time format for templates

parent cc9cd2d2
......@@ -20,7 +20,7 @@ class Location(models.Model):
# Event
# target_datetime; activity; estimated_hours; location; course
class Event(models.Model):
target_datetime = models.DateTimeField("Date and Time: ", max_length = 50)
target_datetime = models.DateTimeField("Date and Time: ", max_length = 50, )
activity = models.CharField("Activity: ", max_length = 50)
estimated_hours = models.FloatField("Estimated Hours: ", max_length = 50)
location = models.ForeignKey(Location, on_delete = models.CASCADE)
......
......@@ -7,7 +7,7 @@
<h1>{{assignment.name}}</h1>
<ul>
<p>Date and Time: {{event.target_datetime}}</p><br>
<p>Date and Time: {{event.target_datetime|date:'m/d/Y, 'h:i A''}}</p><br>
<p>Estimated Hours: {{event.target_datetime}}</p><br>
<p>{{event.course}}</p><br>
<p>Mode: {{location.mode}}</p><br>
......
......@@ -119,6 +119,9 @@ USE_I18N = True
USE_TZ = True
USE_L10N = False
DATE_FORMAT = "%m/%d/%Y"
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.1/howto/static-files/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment