Какая ошибка в моем проекте?

Я использую mongodb для своего проекта python (2.7) с django framework.. когда Я даю python manage.py runserver, он будет работать, но если я синхронизирую базу данных (python manage.py syncdb), в терминале появится следующая ошибка

Creating tables ...  
Traceback (most recent call last):
  File "manage.py", line 14, in <module>
    execute_manager(settings)   
  File "/usr/lib/pymodules/python2.7/django/core/management/__init__.py", line 438, in execute_manager 
    utility.execute()  
  File "/usr/lib/pymodules/python2.7/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)  
  File "/usr/lib/pymodules/python2.7/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)  
  File "/usr/lib/pymodules/python2.7/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/pymodules/python2.7/django/core/management/base.py", line 351, in handle
    return self.handle_noargs(**options)
  File "/usr/lib/pymodules/python2.7/django/core/management/commands/syncdb.py", line 109, in handle_noargs
    emit_post_sync_signal(created_models, verbosity, interactive, db)
  File "/usr/lib/pymodules/python2.7/django/core/management/sql.py", line 190, in emit_post_sync_signal
    interactive=interactive, db=db)  
  File "/usr/lib/pymodules/python2.7/django/dispatch/dispatcher.py", line 172, in send
    response = receiver(signal=self, sender=sender, **named)  
  File "/usr/lib/pymodules/python2.7/django/contrib/auth/management/__init__.py", line 41, in create_permissions
    "content_type", "codename"  
  File "/usr/lib/pymodules/python2.7/django/db/models/query.py", line 107, in _result_iter
    self._fill_cache()  
  File "/usr/lib/pymodules/python2.7/django/db/models/query.py", line 772, in _fill_cache
    self._result_cache.append(self._iter.next())
  File "/usr/lib/pymodules/python2.7/django/db/models/query.py", line 959, in iterator
    for row in self.query.get_compiler(self.db).results_iter():
  File "/usr/local/lib/python2.7/dist-packages/djangotoolbox/db/basecompiler.py", line 229, in results_iter
    for entity in self.build_query(fields).fetch(low_mark, high_mark):
  File "/usr/local/lib/python2.7/dist-packages/djangotoolbox/db/basecompiler.py", line 290, in build_query
    query.order_by(self._get_ordering())
  File "/usr/local/lib/python2.7/dist-packages/djangotoolbox/db/basecompiler.py", line 339, in _get_ordering
    raise DatabaseError("Ordering can't span tables on non-relational backends (%s)" % order)

и

django.db.utils.DatabaseError: Ordering can't span tables on non-relational backends (content_type__app_label)

Как решить эту проблему?

0
задан hjpotter92 17 April 2012 в 09:20
поделиться