当我运行我的Django服务器时,我得到了这个错误:
class HStoreDescriptor(models.fields.subclassing.Creator):
AttributeError: 'module' object has no attribute 'subclassing'我使用的是目前最新的Django 1.10和django-hstore 1.4.2
发布于 2016-08-03 12:27:00
这个问题可以通过将Django降级到1.9版本来轻松解决。似乎1.10版还不稳定。
pip install Django==1.9发布于 2017-05-24 16:43:48
你不需要在1.10上使用Django_Hstore扩展。
在INSTALLED_APPS中添加'django.contrib.postgres‘。
如果Postgres上未启用hstrone,请运行sql脚本:CREATE EXTENSION IF NOT EXISTS hstore
在模型上:添加:from django.contrib.postgres.fields import HStoreField
添加字段:data = HStoreField()
https://stackoverflow.com/questions/38734413
复制相似问题