Hi,

I started walking myself through exercises in django book. At chapter
V - Interacting with a database: Models. I keep getting error when I
try to create class. Otherwise my db connectivity seems fine. I can
run from
>>> django.db import connection
>>> cursor = connection.cursor()
(fine)

Here is the error I am getting:

$ python manage.py shell
>>> from django.db import models
>>> class Person(models.Model):
...     first_name = models.CharField(maxlength=30)
...     last_name = models.CharField(maxlength=30)
...
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/django/db/models/base.py",
line 40, in __new__
    model_module = sys.modules[new_class.__module__]
KeyError: '__console__'

Thanks a lot,
akk


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to