Django-inplaceedit VariableDoesNotExist

时间:2016-02-25 16:27:04

标签: django django-inplaceedit

我有一个简单的模板

{% extends "layout/index.html" %}
{% load inplace_edit %}

{% inplace_edit  "category.name" %}

{% for item in items %}
    {% inplace_edit  "item.title" %}
{% endfor %}

my views.py

def category(request, category_id): 
    return render_to_response("items/category.html",
                              {
                              'category':category,
                              'items':Item.objects.filter(site__categories__id=category_id).filter(publicated=True).order_by('-created'),
                              },
                              context_instance=RequestContext(request))

当我尝试编辑类别时,一切正常

{% inplace_edit  "category.name" %}

但是,当我尝试在循环中的项目中插入编辑器时出现错误:

  

在/ category / 1的VariableDoesNotExist /在[。#34; item]中查找失败   ü" [{' False':False,' None&#39 ;: None,' True':True},{},{}]"

0 个答案:

没有答案