尝试安装Djangochatrooms时无法同步数据库

2024-04-26 05:18:10 发布

您现在位置:Python中文网/ 问答频道 /正文

在遵循安装要求以安装django聊天室(在这里找到:https://github.com/qubird/django-chatrooms/blob/master/README.rst)之后,是时候运行python了管理.py同步数据库。运行命令时,将返回错误和以下回溯:

Creating tables ... Traceback (most recent call last):   File "manage.py", line 20, in <module>
    execute_from_command_line()   File "/home/kevin/Documents/mysite-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 429, in execute_from_command_line
    utility.execute()   File "/home/kevin/Documents/mysite-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)   File "/home/kevin/Documents/mysite-env/local/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)   File "/home/kevin/Documents/mysite-env/local/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)   File "/home/kevin/Documents/mysite-env/local/lib/python2.7/site-packages/django/core/management/base.py", line 351, in handle
    return self.handle_noargs(**options)   File "/home/kevin/Documents/mysite-env/local/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", line 109, in handle_noargs
    emit_post_sync_signal(created_models, verbosity, interactive, db)   File "/home/kevin/Documents/mysite-env/local/lib/python2.7/site-packages/django/core/management/sql.py", line 190, in emit_post_sync_signal
    interactive=interactive, db=db)   File "/home/kevin/Documents/mysite-env/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 172, in send
    response = receiver(signal=self, sender=sender, **named)   File "/home/kevin/Documents/mysite-env/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py", line 30, in create_permissions
    ctype = ContentType.objects.get_for_model(klass)   File "/home/kevin/Documents/mysite-env/local/lib/python2.7/site-packages/polymorphic/__init__.py", line 27, in get_for_model
    model = model._meta.concrete_model AttributeError: 'Options' object has no attribute 'concrete_model'

我的项目是事先工作,所以如果有人可以帮助确定是什么原因导致这个电话,那么我将很高兴。谢谢!你知道吗


Tags: djangoinpyenvhomelibpackageslocal