Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-1830

Comment on: "manual/tutorial/write-a-tumblelog-application-with-django-mongodb-engine.txt"

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • Affects Version/s: None
    • Component/s: None
    • Environment:

      If I install django-nonrel-1.3, run
      >python manage.py syncdb
      Creating tables ...
      Traceback (most recent call last):
      File "manage.py", line 14, in <module>
      execute_manager(settings)
      File "F:\webapps\Python27\lib\site-packages\django\core\management_init_.py", line 438, in execute_manager
      utility.execute()
      File "F:\webapps\Python27\lib\site-packages\django\core\management_init_.py", line 379, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
      File "F:\webapps\Python27\lib\site-packages\django\core\management\base.py", line 191, in run_from_argv
      self.execute(*args, **options._dict_)
      File "F:\webapps\Python27\lib\site-packages\django\core\management\base.py", line 220, in execute
      output = self.handle(*args, **options)
      File "F:\webapps\Python27\lib\site-packages\django\core\management\base.py", line 351, in handle
      return self.handle_noargs(**options)
      File "F:\webapps\Python27\lib\site-packages\django\core\management\commands\syncdb.py", line 109, in handle_noargs
      emit_post_sync_signal(created_models, verbosity, interactive, db)
      File "F:\webapps\Python27\lib\site-packages\django\core\management\sql.py", line 190, in emit_post_sync_signal
      interactive=interactive, db=db)
      File "F:\webapps\Python27\lib\site-packages\django\dispatch\dispatcher.py", line 172, in send
      response = receiver(signal=self, sender=sender, **named)
      File "F:\webapps\Python27\lib\site-packages\django\contrib\auth\management_init_.py", line 41, in create_permission
      s
      'content_type', 'codename')[:1000000]:
      File "F:\webapps\Python27\lib\site-packages\django\db\models\query.py", line 107, in _result_iter
      self._fill_cache()
      File "F:\webapps\Python27\lib\site-packages\django\db\models\query.py", line 774, in _fill_cache
      self._result_cache.append(self._iter.next())
      File "F:\webapps\Python27\lib\site-packages\django\db\models\query.py", line 961, in iterator
      for row in self.query.get_compiler(self.db).results_iter():
      File "F:\webapps\Python27\lib\site-packages\djangotoolbox-0.9.2-py2.7.egg\djangotoolbox\db\basecompiler.py", line 229,
      in results_iter
      for entity in self.build_query(fields).fetch(low_mark, high_mark):
      File "F:\webapps\Python27\lib\site-packages\django_mongodb_engine-0.4.0-py2.7.egg\django_mongodb_engine\compiler.py",
      line 78, in fetch
      results = self._get_results()
      File "F:\webapps\Python27\lib\site-packages\django_mongodb_engine-0.4.0-py2.7.egg\django_mongodb_engine\compiler.py",
      line 112, in _get_results
      results = self.collection.find(self._mongo_query, fields=fields)
      File "F:\webapps\Python27\lib\site-packages\django_mongodb_engine-0.4.0-py2.7.egg\django_mongodb_engine\utils.py", lin
      e 42, in wrapper
      result = getattr(self.collection, method)(*args, **kwargs)
      File "F:\webapps\Python27\lib\site-packages\pymongo\collection.py", line 483, in find
      raise TypeError("fields must be an instance of list")
      TypeError: fields must be an instance of list

      If I install django-nonrel-1.3,
      it asks me to change { to [ for INSTALLED_APP in setting.py, then I got this error:
      Traceback (most recent call last):
      File "manage.py", line 14, in <module>
      execute_manager(settings)
      File "F:\webapps\Python27\lib\site-packages\django\core\management_init_.py", line 459, in execute_manager
      utility.execute()
      File "F:\webapps\Python27\lib\site-packages\django\core\management_init_.py", line 382, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
      File "F:\webapps\Python27\lib\site-packages\django\core\management_init_.py", line 261, in fetch_command
      klass = load_command_class(app_name, subcommand)
      File "F:\webapps\Python27\lib\site-packages\django\core\management_init_.py", line 69, in load_command_class
      module = import_module('%s.management.commands.%s' % (app_name, name))
      File "F:\webapps\Python27\lib\site-packages\django\utils\importlib.py", line 35, in import_module
      _import_(name)
      File "F:\webapps\Python27\lib\site-packages\django\core\management\commands\syncdb.py", line 8, in <module>
      from django.core.management.sql import custom_sql_for_model, emit_post_sync_signal
      File "F:\webapps\Python27\lib\site-packages\django\core\management\sql.py", line 6, in <module>
      from django.db import models
      File "F:\webapps\Python27\lib\site-packages\django\db_init_.py", line 40, in <module>
      backend = load_backend(connection.settings_dict['ENGINE'])
      File "F:\webapps\Python27\lib\site-packages\django\db_init.py", line 34, in __getattr_
      return getattr(connections[DEFAULT_DB_ALIAS], item)
      File "F:\webapps\Python27\lib\site-packages\django\db\utils.py", line 93, in _getitem_
      conn = backend.DatabaseWrapper(db, alias)
      File "F:\webapps\Python27\lib\site-packages\django_mongodb_engine-0.4.0-py2.7.egg\django_mongodb_engine\base.py", line
      87, in _init_
      self.ops = DatabaseOperations(self)
      File "F:\webapps\Python27\lib\site-packages\djangotoolbox-0.9.2-py2.7.egg\djangotoolbox\db\base.py", line 28, in __ini
      t__
      super(NonrelDatabaseOperations, self)._init_()
      TypeError: _init_() takes exactly 2 arguments (1 given)

            Assignee:
            sam.kleinman Sam Kleinman (Inactive)
            Reporter:
            liuyuwan Yuwan Liu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              10 years, 44 weeks, 6 days ago