Re: reverse foreign key relationship usage

2013-03-06 Thread Fatih Tiryakioglu
Thank you Robert, I got it. -- 6 Mart 2013 Çarşamba 12:06:06 UTC+2 tarihinde Roberto López López yazdı: > > > Hi Fatih, > > This is extremely useful in case you have two different relations > between the same model. As a rough example, consider the two following > models: > > class

Re: reverse foreign key relationship usage

2013-03-06 Thread Roberto López López
Hi Fatih, This is extremely useful in case you have two different relations between the same model. As a rough example, consider the two following models: class Person(models.Model): name = models.CharField(max_length=30) class Car(models.Model): model =

reverse foreign key relationship usage

2013-03-05 Thread Fatih Tiryakioglu
Hello all, In Appendix B:Database API, it says "related_name (keyword) is particularly useful if a model has two foreign keys to the same second model." which is about 'related_name' keyword used reverse foreign key relationships. e.g. blog = ForeignKey(Blog, related_name='entries'). What