Найти - Пользователи
Полная версия: django-hstore
Начало » Django » django-hstore
1
wadadaaa
При сохранении
recipe
возникает
ValueError at /admin/recipes/recipe/add/
No exception message supplied

Exception Location:	/Users/username/.virtualenvs/recipes/lib/python2.7/site-packages/django_hstore/utils.py in acquire_reference, line 16

model.py
from django_hstore import hstore
class Recipe(models.Model):
    title = models.CharField(max_length=50)
    steps = hstore.ReferencesField()
    objects = hstore.HStoreManager()

settings.py
SOUTH_DATABASE_ADAPTERS = {'default': 'south.db.postgresql_psycopg2'}
DJANGO_HSTORE_GLOBAL_REGISTER = False

Как думаете, в чем проблема?
Спасибо!
wadadaaa
Решено!
steps = hstore.ReferencesField()
должно быть
steps = hstore.DictionaryField(db_index=True)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB