Thank you for the quick feedback! I like the mixin analogy.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubsc
I was just wondering why fields.RelatedField doesn't subclass
models.Field?
The comment for RelatedField is that it's a hack, and from what I can
see RelatedField doesn't override any of Field's functionatliy.
This way, fields.ManyToMany and fields.ForeignKey wouldn't have to use
multiple inheri
> For example:
>
> class Vacation(Model):
> ...
> class Meta:
> through = ('person', 'location')
>
> Yours,
> Russ Magee %-)
Sounds good to me. Unless someone else has a better suggestion, I
will go ahead and start work on a patch.
--~--~-~--~~~---~--~---
> My personal preference for that ticket is that the annotation to say
> which foreign keys to use should belong on the model for the
> intermediate table, not adding to the declaration of the connecting
> models.
That is a very fair point. Therefore, how does the following sound?
from django.
Given the example code in the ticket:
from django.db import models
class Person(models.Model):
name = models.CharField(max_length=100)
vacations = models.ManyToManyField('Location', through='Vacation',
blank=True)
class Location(models.Model):
city = models.CharField(max_length=100