Hi Russ --

I'm +1 on merging the patch immediately. I have some feedback on the
couple of issues you raised below, but I see no reason they can't be
addressed after merging.

On Fri, Oct 30, 2009 at 3:33 AM, Russell Keith-Magee
<[email protected]> wrote:
> The automatically generated m2m model is the equivalent of the following:
>
> class Book_authors:
>    book = ForeignKey(Book)
>    author = ForeignKey(Author)

I can't quite see how you'd "get at" this model class, should I want
it. I guess I could go through `django.db.models.loading.get_model`,
right? Is the intention to make this class an internal implementation
detail? If so, then it's just fine that it's not directly available...
but if this model is supposed to be available to public code then do
we need a better way to expose it?

I ask because...

>  * #11795 (allowing admin inlines for m2m objects) becomes a 2 line
> fix, plus documentation. Since this patch makes m2m tables fully
> fledged Django objects, you can reference them in the models= line of
> a TabularInline. m2m inlines are actually possible without any change
> on top of this patch - but with two extra lines, it becomes a lot
> easier to use.

... it seems that to make this fix you'd need to somehow "get at"
those related models. Right?

>  * #5537 becomes a purely documentation fix. If you use a related_name
> of '+' on your model, the related object is hidden. The only question
> here is whether we want to document this change - so far the '+' thing
> has been an internal implementation issue, so we need to decide if we
> want to make this official.

`related_name="+"` makes me wince. It's entirely unclear (to me) that
"+" means "hide the reverse relation", so I'm -1 on documenting that
fact.

However, it's useful behavior, so why not just add a constant to
`django.db.models` for that? It'd then look like::

    fk = models.ForeignKey(ToModel, related_name=models.HIDE_RELATED)

Jacob

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to