('^update/\d+$', update_channel),В views.py так:
def update_channel(request, channelid):
channel_id=int(channelid)
create_list('single', '/tmp/db_fake_dump', ch_id=channel_id)
check_list('/tmp/db_fake_dump')
t = get_template('index.html')
html = t.render(Context({'channels': ch.objects.all().order_by('id'), 'host':request.get_host()}))
return HttpResponse(html)
При переходе по url получаю ошибку:
Exception Value:
update_channel() takes exactly 2 arguments (1 given)
Вот вывод “copy-and-paste view” ошибки:
Environment:
Request Method: GET
Request URL: http://10.10.13.253:8080/update/15
Django Version: 1.2.3
Python Version: 2.6.6
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'iptvmon.iptvmonitor']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Traceback:
File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py" in get_response
100. response = callback(request, *callback_args, **callback_kwargs)
Exception Type: TypeError at /update/15
Exception Value: update_channel() takes exactly 2 arguments (1 given)