Commit 638bbd58 authored by RJC's avatar RJC

changed target_datetime to aware utc datetime

parent 244fd7c7
......@@ -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(
......
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,
......
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