Hello everyone,
This might be a newbie question but I'm not sure why this code displays: It
is now Sept. 22, 2013, 11:29 a.m..
from django.http import HttpResponse
from django.template import Context
from django.template.loader import get_template
import datetime
def hello(request):
return HttpResponse("Hello World!")
def current_time(request):
rnow = datetime.datetime.now()
t = get_template("current_time.html")
html = t.render(Context({"current_date": rnow}))
return HttpResponse(html)
How come this code doesn't display instead: It is now 2013-09-22
11:14:11.947265?
Thanks.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.