Reputation: 19
I'm trying to use Django and to add a flatpage.
ValueError at /admin/flatpages/flatpage/add/
Cannot use None as a query value
Request Method: POST
Request URL: http://localhost:8000/admin/flatpages/flatpage/add/
Django Version: 1.4.2
Exception Type: ValueError
Exception Value:
Cannot use None as a query value
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']
How to get rid of it?
Thank you
Upvotes: 2
Views: 681
Reputation: 308889
It appears to be a bug in Django 1.4. You get the error if you attempt to save a flatpage without choosing a value for sites
https://code.djangoproject.com/ticket/18234
It has been fixed for the upcoming Django 1.5. For Django 1.4, you can avoid the problem by specifying a site for your flatpage.
Upvotes: 3