Add simple html ui for calendar activities

parent 330419f8
from .models import Event, Location
from django.http import HttpResponse from django.http import HttpResponse
def index(request): def index(request):
return HttpResponse('Hello World! This came from the index view') html_string = 'robo_mommy’s Calendar of Activities<br>'
for eventItem in Event.objects.all():
html_string += '''
<br>
Date and Time: {}<br>
Activity: {}<br>
Estimated Hours: {}<br>
Course/Section: {}<br>
Mode: {}<br>
Venue: {}<br><br>
'''.format(
eventItem.target_datetime,
eventItem.activity,
eventItem.estimated_hours,
eventItem.course,
eventItem.location.mode,
eventItem.location.venue,
)
return HttpResponse(html_string)
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