Thursday, June 24, 2010

Re: pointer 1to1, '_ptr', what are the rules?

On Thu, Jun 24, 2010 at 5:18 PM, Skylar Saveland <skylar.saveland@gmail.com> wrote:
I have:

class Foo(models.Model):

   ...


class Bar(Foo):

 class Meta:
   proxy=True


class Baz(Foo):

 ...

my baz instances have a `foo_ptr` attr on them and my bar instances do
not.  The only reason I can think of that this is is b/c Bar is a
proxy.  Is this correct?  Is there some documentation or other
readings that I can do to understand what is happening under the
covers?  I suppose that I could grep the source code...

Right, so I'm right.  I guess I'll just leave this for the next
hapless googler who is not greping the source.

Grepping the source seems like not the easiest way to find this answer.  The first doc hit when you search on "Proxy" is:

http://docs.djangoproject.com/en/dev/topics/db/models/#id8

Karen
--
http://tracey.org/kmt/

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment