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): ...@@ -18,7 +18,7 @@ class Location(models.Model):
class Event(models.Model): class Event(models.Model):
target_datetime = models.CharField(max_length=20) target_datetime = models.DateTimeField()
activity = models.CharField(max_length=100) activity = models.CharField(max_length=100)
estimated_hours = models.FloatField() estimated_hours = models.FloatField()
location = models.ForeignKey( location = models.ForeignKey(
......
from .models import Event, Location from .models import Event, Location
from django.http import HttpResponse from django.http import HttpResponse
from forum.views import convert_utc_to_local
def index(request): def index(request):
...@@ -14,7 +15,7 @@ def index(request): ...@@ -14,7 +15,7 @@ def index(request):
Mode: {}<br> Mode: {}<br>
Venue: {}<br><br> Venue: {}<br><br>
'''.format( '''.format(
eventItem.target_datetime, convert_utc_to_local(eventItem.target_datetime, '%d/%m/%Y|%I:%M %p'),
eventItem.activity, eventItem.activity,
eventItem.estimated_hours, eventItem.estimated_hours,
eventItem.course.code, 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