1from django.http import HttpResponse
2import datetime
3
4def current_datetime(request):
5 now = datetime.datetime.now()
6 html = "<html><body>It is now %s.</body></html>" % now
7 return HttpResponse(html)
8
1from django.http import HttpResponse
2import datetime
3
4def current_datetime(request):
5 now = datetime.datetime.now()
6 html = "<html><body>It is now %s.</body></html>" % now
7 return HttpResponse(html)