On 4/24/06, Ian Holsman <[EMAIL PROTECTED]> wrote:
> I've done a bit more work on this, and have got it working on the
> query_set set side (I haven't testing adding things via it yet)
>
> I have created a Field called 'CTField' which will acts like a regular
> foreign key, but only fetches things which match the content_type as
> well.
>
> this means you can treat comments as first class citizens in your model again.
>
> eg..
>
> from zilbo.common.utils.related import CTField
>
> class Conversation( models.Model ):
>     ....
>    comments = CTField( Comment )
>
> and then it acts like any other query set.
>
> code is here: 
> http://svn.zilbo.com/svn/django/magic-removal/common/utils/related.py
>
> comments are welcome. I'm still not sure if this is the 'right' thing to do

Wow, I'm just now seeing this. If I'm understanding this correctly,
this is a *very* cool addition! Are you willing to contribute this?

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to