JoneXiong / YouPBX

A great GUI manager for FreeSwitch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

执行python manage.py syncdb遇到一个问题

yuanfangblues opened this issue · comments

AttributeError: type object 'SystemSettings' has no attribute '_get_next_or_previous_by_FIELD'

提示说SystemSettings没有_get_next_or_previous_by_FIELD属性,不太理解,还望解答。。

打印异常如下
Traceback (most recent call last): File "manage.py", line 16, in <module> execute_from_command_line(sys.argv) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line utility.execute() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute django.setup() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/__init__.py", line 27, in setup apps.populate(settings.INSTALLED_APPS) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate app_config.import_models() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/apps/config.py", line 202, in import_models self.models_module = import_module(models_module_name) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gevent/builtins.py", line 93, in __import__ result = _import(*args, **kwargs) File "/Users/yuanfang/pyProjects/YouPBX/xadmin/models.py", line 117, in <module> class SystemSettings(models.Model): File "/Users/yuanfang/pyProjects/YouPBX/xadmin/models.py", line 24, in __new__ ret = ModelBase.__new__(cls, name, bases, attrs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", line 162, in __new__ new_class.add_to_class(obj_name, obj) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", line 325, in add_to_class value.contribute_to_class(cls, name) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 1287, in contribute_to_class curry(cls._get_next_or_previous_by_FIELD, field=self, is_next=True) AttributeError: type object 'SystemSettings' has no attribute '_get_next_or_previous_by_FIELD'