Speaking on a semantic level, a "proxy" is a stand-in acting on behalf
of (or in place of) another entity. There is an implied near-
equivalence, but inherent in the idea of a proxy is that it is *not*
the same as the original. As in the case of assigning a proxy to vote
for you in corporate elections: the proxy you delegate your right to
vote to is the functional equivalent of you, but they are recognized
as not *actually* being you.
In my mind the same reasoning applies to Proxy Models. While they are
a stand-in for accessing the same underlying data, they may have very
different properties (ordering, methods, etc.). So while they may pass
a rough equivalence test, they are in specific ways dissimilar. The
underlying table/data stored by the model is only one piece of what
makes up the sum total of a model.
That said, I can certainly see the use case for comparing proxy models
as equal to the original model...
All the best,
- Gabriel
On Oct 20, 6:24 am, Byron <
bjr...@gmail.com> wrote:
> Continuing from...
http://code.djangoproject.com/ticket/14492
>
> > the real issue here is "What is a Proxy", and "what is equality"
>
> I agree, that is the real issue. I based most of my reasoning off of
> what the docs already state in that a proxy model can be written to
> extend the behavior of the model being proxied, i.e. the data model
> cannot be changed. That being said, I feel the default behavior when
> dealing with equality, other data related things... should inherit
> from there parent. If there is a need to override this behavior, I am
> sure other hooks can be implemented to customize proxy models
> differently then there parent. With regards to my primary issue of
> equality, in this context two objects are being compared to determine
> whether they represent the same row of data. It seems less likely to
> compare two model objects to only be interested in whether they are
> equal data structures.
>
> Regarding permissions, the arguments presented inhttp://
code.djangoproject.com/ticket/11154