Awww crap - Adrian is right, I am smoking crack. I ran into the same problem when playing with the django models in the python shell after adding a new foreign key relationship. I changed the import statement and reloaded the shell and the problem went away. In retrospect it is now obvious it was the reload and not the changed import that fixed things!


Mea Culpa,

Sean Cazzell


Adrian Holovaty wrote:

On 10/21/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
You won't have the get_reporter() method unless you have also imported
the reporter module.  That is, if you just do:

from django.models.examplemodel import articles
a = articles.get_object(pk=1)
a.get_reporter()  # This will fail!!

Change the import line to also import reporters:

from django.models.examplemodel import articles, reporters

This is completely false! Import statements don't influence the
creation of methods. I repeat: This is completely false.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org


Reply via email to