Hey,

I'm a newbie to Django/Python world (PHP guy). I'm just going through
some tutorials to get things figured out. Everything was working fine
until when I was working through the last section of
http://djangobook.com/en/2.0/chapter03/ on Dynamic URLs. It seems be
an error in the views.py. When I enter the follow:
def hours_ahead(request, offset):
# try:
# offset = int(offset)
# except ValueError:
# raise Http404()
dt = datetime.datetime.now() + datetime.timedelta(hours=offset)
html = "<html><body>In %s hour(s), it will be %s.</body></html>" %
(offset, dt)
return HttpResponse(html)

I got to this error: TypeError....hours_ahead() takes exactly 2
arguments (1 given)
It mentions: Exception Location: /usr/lib/pymodules/python2.6/django/
core/handlers/base.py in get_response, line 92

It would seem to be some error with the get_response. Have I set
something up wrong that it isn't pulling the information back
correctly?

I'm rather stumped. I'd really appreciate a bit of help on this one.
Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to