我正在尝试使用 Django 并添加一个平面页面。
/admin/flatpages/flatpage/add/处的值错误
不能使用 None 作为查询值
Request Method: POST
Request URL: http://localhost:8000/admin/flatpages/flatpage/add/
Django Version: 1.4.2
Exception Type: ValueError
Exception Value:
不能使用 None 作为查询值
Exception Location: C:\Python27\lib\site-packages\django\db\models\sql\query.py in add_filter, line 1095
Python Executable: C:\Python27\python.exe
Python Version: 2.7.3
Python Path:
['C:\\Users\\ivo\\Desktop\\eclipse-jee-indigo\\workspace\\blog',
'C:\\Users\\ivo\\Desktop\\eclipse-jee-indigo\\workspace\\blog',
...
'C:\\Python27\\lib\\site-packages\\Pythonwin']
如何摆脱它?
谢谢
请您参考如下方法:
这似乎是 Django 1.4 中的一个错误。如果您尝试在未为 sites
https://code.djangoproject.com/ticket/18234
它已为即将到来的 Django 1.5 修复。对于 Django 1.4,您可以通过为平面页面指定站点来避免该问题。
