this is my view.py
from django.http import HttpResponse
import datetime
def current_datetime(request):now = datetime.datetime.now()html = "<html><body>It is now %s.</body></html>" % nowreturn HttpResponse(html)
def hours_ahead(request, offset):offset = int(offset)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)
this is my urls.py
from django.conf.urls import patterns, url, include
from mysite.view import current_datetime, hours_ahead
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'mysite.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),# url(r'^admin/', include(admin.site.urls)),
(r'^time/$', current_datetime),
#(r'^time/plus/\d{1,2}/$', hours_ahead),
url(r'$', 'mysite.view.hours_ahead', name='hours_ahead'),
)
when i try to go to this localhost:8000/time/plus/24/ I have the error hours_ahead() takes exactly 2 arguments (1 given)