- Generic views don’t work with the datastore queries ‘Query’ object has no attribute ‘_clone’
2008-08-11
GAE 出现'Query' object has no attribute '_clone'问题 - [程序人生]
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://bincn.blogbus.com/logs/27550933.html
今天用在GAE使用 generic views,出现'Query' object has no attribute '_clone' 这个问题
经过搜索 ,这个网页(Google App Engine First Impressions)上提到
随机文章:
使用Google App Engine Helper for Django 2008-08-06
EasyEclipse + EclipseHTMLEditor 开发Django 2008-08-03
2009-11-04 2009-11-04
成功注册上Google App Engine 2008-08-06
收藏到:Del.icio.us
引用地址:








评论
多多交流:P
set=Post.objects.all().order('-date')
try :
set._clone()
except AttributeError :
set._clone=lambda:set
try :
set.model
except AttributeError :
set.model=Post
post_list_info = {
'queryset' : set,
'allow_empty': True,
'paginate_by':6,
'extra_context':{'users':users,},
}
urlpatterns += patterns('',
(r'^posts/(?P<page>\d+)$', list_detail.object_list, post_list_info),
)