def show_category(request, category_key,
template_name="store_category.html"):
key = db.Key(category_key)
query = Category.gql('WHERE __key__ = :1 AND is_active = True', key)
category = query.get()
if not category:
raise Http404('Category not found!')
products = category.products
page_title = category.name
return render_to_response(template_name, locals(), context_instance=RequestContext(request))
评论列表
文章目录