我正在尝试使用此处的指南为我的项目配置 django-activity-stream django-activity-stream
我有模型用户
(django-contrib-auth),文章
正如文档中提到的,我使用语句注册事件的模型
registry.register(User)
registry.register(Article)
执行 runserver 命令时,出现以下错误
Unhandled exception in thread started by <function wrapper at 0x7f3a680547d0>
Traceback (most recent call last):
File "/home/xxxx/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 93, in wrapp
er
fn(*args, **kwargs)
File "/home/xxxx/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py",
line 102, in inner_run
self.validate(display_num_errors=True)
File "/home/xxxx/local/lib/python2.7/site-packages/django/core/management/base.py", line 310, in
validate
num_errors = get_validation_errors(s, app)
File "/home/xxxx/local/lib/python2.7/site-packages/django/core/management/validation.py", line 34
, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/home/xxxx/local/lib/python2.7/site-packages/django/db/models/loading.py", line 196, in get
_app_errors
self._populate()
File "/home/xxxx/local/lib/python2.7/site-packages/django/db/models/loading.py", line 75, in _pop
ulate
self.load_app(app_name, True)
File "/home/xxxx/local/lib/python2.7/site-packages/django/db/models/loading.py", line 99, in load
_app
models = import_module('%s.models' % app_name)
File "/home/xxxx/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import
_module
__import__(name)
File "/home/xxxx/local/lib/python2.7/site-packages/registration/models.py", line 15, in <module>
User = get_user_model()
File "/home/xxxx/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 127, in
get_user_model
user_model = get_model(app_label, model_name)
File "/home/xxxx/local/lib/python2.7/site-packages/django/db/models/loading.py", line 271, in get
_model
self._populate()
File "/home/xxxx/local/lib/python2.7/site-packages/django/db/models/loading.py", line 75, in _pop
ulate
self.load_app(app_name, True)
File "/home/xxxx/local/lib/python2.7/site-packages/django/db/models/loading.py", line 99, in load
_app
models = import_module('%s.models' % app_name)
File "/home/xxxx/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import
_module
__import__(name)
File "/home/xxxx/maldio/maldio_project/links/models.py", line 115, in <module>
registry.register(User)
File "/home/xxxx/local/lib/python2.7/site-packages/actstream/registry.py", line 85, in register
self[model_class] = setup_generic_relations(model_class)
File "/home/xxxx/local/lib/python2.7/site-packages/actstream/registry.py", line 39, in setup_gene
ric_relations
setattr(Action, attr_value, None)
AttributeError: 'NoneType' object has no attribute 'actions_with_auth_user_as_actor'
有什么我错过的吗?
提前致谢
我是一名优秀的程序员,十分优秀!