错误:
ImproperlyConfigured at /exam/selfdo/save_result
The included urlconf '5' does not appear to have any patterns in it. If you see valid patterns in the file
then the issue is probably caused by a circular import.
错误代码:
return redirect(reverse('exam:show_record',answer_record.pk))
url : url(r'^selfdo/show_record/(\d+)$',views.show_record,name='show_record'),
原因:reversef反解析是传递参数的格式不正确
解决:
return redirect(reverse('exam:show_record',args=(answer_record.pk,)))
以元组的方式传递
详见: URL反解析:reverse