2
在管理員中,我們在使用cycle
模板標記時遇到了上述錯誤。塊標記無效:'add_preserved_filters'
完整堆棧跟蹤:
TemplateSyntaxError at /admin/app/page/
Invalid block tag: 'add_preserved_filters', expected 'elif', 'else' or 'endif'
Request Method: GET
Request URL: http://localhost:8000/admin/app/page/
Django Version: 1.5.1
Exception Type: TemplateSyntaxError
Exception Value:
Invalid block tag: 'add_preserved_filters', expected 'elif', 'else' or 'endif'
Exception Location: /home/alex/.pyenv/versions/2.7.5/lib/python2.7/site-packages/Django-1.5.1-py2.7.egg/django/template/base.py in invalid_block_tag, line 327
Python Executable: /home/alex/.pyenv/versions/2.7.5/bin/python
Python Version: 2.7.5
Python Path:
['/home/alex/.pyenv/versions/2.7.5/lib/python2.7/site-packages/setuptools-5.4-py2.7.egg',
'/home/alex/.pyenv/versions/2.7.5/lib/python2.7/site-packages/Django-1.5.1-py2.7.egg',
'/home/alex/.pyenv/versions/2.7.5/lib/python2.7/site-packages/numpy-1.8.1-py2.7-linux-x86_64.egg',
'/home/alex/.pyenv/versions/2.7.5/lib/python2.7/site-packages/pytz-2014.4-py2.7.egg',
'/home/alex/.pyenv/versions/2.7.5/lib/python27.zip',
'/home/alex/.pyenv/versions/2.7.5/lib/python2.7',
'/home/alex/.pyenv/versions/2.7.5/lib/python2.7/plat-linux2',
'/home/alex/.pyenv/versions/2.7.5/lib/python2.7/lib-tk',
'/home/alex/.pyenv/versions/2.7.5/lib/python2.7/lib-old',
'/home/alex/.pyenv/versions/2.7.5/lib/python2.7/lib-dynload',
'/home/alex/.pyenv/versions/2.7.5/lib/python2.7/site-packages']
你是否覆蓋默認'change_form'? – karthikr
這是更改列表。但我重寫了'change_list'。當移除時,我得到另一個例外。我已經更新了這個問題。 –