[DOCS-1830] Comment on: "manual/tutorial/write-a-tumblelog-application-with-django-mongodb-engine.txt" Created: 19/Aug/13  Updated: 03/Nov/17  Resolved: 28/Aug/13

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Improvement Priority: Major - P3
Reporter: Yuwan Liu Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Python 2.7, window XP

Location: http://docs.mongodb.org/manual/tutorial/write-a-tumblelog-application-with-django-mongodb-engine/
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:23.0) Gecko/20100101 Firefox/23.0
Screen Resolution: 1024 x 768
repo: docs
source: tutorial/write-a-tumblelog-application-with-django-mongodb-engine


Participants:
Days since reply: 10 years, 25 weeks ago

 Description   

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)



 Comments   
Comment by auto [ 28/Aug/13 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-1872 DOCS-1830: flask tutorial
Branch: v2.2
https://github.com/mongodb/docs/commit/f2909d94c58ef16370aa3523a3d000ed38cb6298

Comment by auto [ 28/Aug/13 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-1872 DOCS-1830: flask tutorial
Branch: master
https://github.com/mongodb/docs/commit/e4d2a14276d97e9e5d9670579c029564fe34082b

Generated at Thu Feb 08 07:42:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.