On 4/9/07, checco <[EMAIL PROTECTED]> wrote:
> Then, these really basic statements give me this error:
>
> >>> from django.db import models
> >>> class Person(models.Model):
>         pass

This is somewhat counterintuitive unless you know a bit about how
Django's model system works; 'app_label' is an attribute of the model
class which needs to exist for Django to figure some things out about
it, and is derived from the location of the file which contains the
model class definition. As a result, defining a model "on the fly" in
the Python shell doesn't really work, because there is no "file" in
which the model gets defined.


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~---------~--~----~------------~-------~--~----~
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