I found out that Django doesn't use the related_name as an alias for
the join, but an incremented name (strings, strings1, strings2,
strings3 ...)
Does anyone know why/how to change this?
On Jan 25, 10:29 am, Rufman <[EMAIL PROTECTED]> wrote:
> Hey
> How can I follow the foreign key relation by
Hey
How can I follow the foreign key relation by related_name by using
select_related()?
ex:
Class Strings(models.Model):
string = CharField(max_length=255)
Class Stuff(models.Model):
spam = models.ForeignKey(Strings, db_column='spam',
related_name='spam', db_index=True, blank=True)
2 matches
Mail list logo