Closed GoogleCodeExporter closed 9 years ago
I have the same error when defining a simple model (e.g. the poll application
from the Django tutorial) and running "python manage.py shell".
Original comment by Dominic....@gmail.com
on 17 Jun 2010 at 2:12
I can't seem to reproduce this.
With a simple Django application called 'test' installed in my settings.py
containing a models.py with the Poll model in it, I can use the shell and
dumpdata without issues.
~/google-app-engine-django/trunk$ python manage.py shell
Python 2.5.2 (r252:60911, Jan 20 2010, 23:14:04)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import django
>>> django.VERSION
(1, 1, 2, 'final', 0)
>>> from test.models import Poll
>>> p = Poll(question='foo')
>>> p.put()
datastore_types.Key.from_path(u'Poll', 2L, _app=u'google-app-engine-django')
>>>
~/google-app-engine-django/trunk$ python manage.py dumpdata
[{"pk": "ahhnb29nbGUtYXBwLWVuZ2luZS1kamFuZ29yCgsSBFBvbGwYAQw", "model":
"test.poll", "fields": {"pub_date": null, "question": "foo"}}, {"pk":
"ahhnb29nbGUtYXBwLWVuZ2luZS1kamFuZ29yCgsSBFBvbGwYAgw", "model": "test.poll",
"fields": {"pub_date": null, "question": "foo"}}]
Can you provide more details on how to reproduce this please?
Original comment by m...@google.com
on 17 Jun 2010 at 9:14
The bug is triggered with Django 1.2.1, not Django 1.1.2
Original comment by felixle...@gmail.com
on 17 Jun 2010 at 9:26
My bad, I transposed the position of the 2 in my head when checking the version.
Adding auto_created=False to the ModelOptions fixes the immediate problem, but
seems to raise a bunch more when trying to dump.
* Django 1.2.1 seems to expect a fields attribute on the ModelOptions class
* Django 1.2.1 seems to expect an attribute named using on the Model class,
which is a function.
I'm not sure what the semantics of those two requirements are at this stage.
Can you dig into this some more and provide a patch?
Original comment by m...@google.com
on 17 Jun 2010 at 9:37
Here's the patch. Needs testing though :)
Original comment by felixle...@gmail.com
on 18 Jun 2010 at 8:53
Attachments:
thanks for the patch
Original comment by nicolas....@gmail.com
on 29 Aug 2010 at 11:53
models.patch above fixed the issue for me.
Original comment by conn...@gmail.com
on 19 Sep 2010 at 10:01
Why is this patch not applied to SVN yet?
Original comment by jonkeat...@gmail.com
on 23 Oct 2010 at 11:36
Felix, can you please sign the CLA as described in the README file so that we
can accept this patch?
Original comment by m...@google.com
on 26 Oct 2010 at 12:16
The bug is also triggered with Django 1.2.3!
thanks too for the patch !
Original comment by gwey...@gmail.com
on 26 Oct 2010 at 3:27
OK, signed ;)
Original comment by felixle...@gmail.com
on 27 Oct 2010 at 12:23
Patch merged in r108. Thanks and apologies for the delay.
Original comment by m...@google.com
on 27 Oct 2010 at 9:36
Original issue reported on code.google.com by
felixle...@gmail.com
on 16 Jun 2010 at 4:06