Thanks a lot James,

I've just tried the same modifying an existing file of the cheeserater
source code: to be precise I added the following lines:

class Person(models.Model):
    pass

at the end of the file models.py under c:\cheeserater\packages but I
still get the same error

Maybe I misunderstood the previous reply?

Anyway I seem to remember that I didn't have problems, in the past,
making a class definition within the shell (but I could be wrong).

Any further help will be very appreciated.
Francesco

P.S. Just for your information: when I start the development server
the local site (cheeserater) works fine

On Apr 9, 10:56 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> 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