Generic detail view DetailView must be called with either an object pk or a slug.
2014-04-03 15:22
721 查看
解决办法
This is the correct core:
把URL捕获的组名称改为pk
参照:
http://stackoverflow.com/questions/12304050/django-tutorial-generic-views-attribute-error
[code] url(r'^(?P<poll_id>\d+)/$',-$ url(r'^(?P<poll_id>\d+)/results/$',-$
This is the correct core:
[code] url(r'^(?P<pk>\d+)/$',-$ url(r'^(?P<pk>\d+)/results/$',-$
把URL捕获的组名称改为pk
参照:
http://stackoverflow.com/questions/12304050/django-tutorial-generic-views-attribute-error
相关文章推荐
- 了解WaitForSingleObject中WAIT_ABANDONED 返回值
- STAF中的STAFObject结构体
- 素描令牌:一个中层的学习轮廓和目标检测的表征Sketch Tokens: A Learned Mid-level Representation for Contour and Object Detec
- 'NoneType' object has no attribute '__getitem__'和argument of type 'NoneType' is not iterable 异常的解决办法
- Objective-C语法之Category的使用
- objective-c中Category类别(扩展类)专题总结
- Line: 209 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:209:-1
- 关于延迟加载(lazy)和强制加载(Hibernate.initialize(Object proxy) )
- Objective-C语法之Objective-C语言和iOS系统(简介,语法,系统结构)
- Objective-C语法之基本数据类型
- 十分钟让你明白Objective-C的语法(和Java、C++的对比)
- Objective-C语法之字符串NSString
- CGdiObject::DeleteObject的说法
- 泛型中字符串转集合,(T)object,typeOf(T),LIst<T> xxx<T>();c# stringtolist
- Objective-C语法之NSArray和NSMutableArray
- Objective-C语法之NSDictionary和NSMutableDictionary
- objective c 基础
- PHP stdClass Object转array
- PHP stdClass Object转array
- CreateCompatibleDC,CreateCompatibleBitmap,SelectObject详解