Re: Paginator and foreign key

2010-12-14 Thread bruno desthuilliers
On 13 déc, 19:49, refreegrata wrote: > thanks for the answer, but the solution don't show anything. I must be > doing something wrong. > if now I have > --- > class Myline(models.mode): >    fk_myDoc = models.ForeignKey(MyDoc, related_name="") > --- >

Re: Paginator and foreign key

2010-12-13 Thread refreegrata
thanks for the answer, but the solution don't show anything. I must be doing something wrong. if now I have --- class Myline(models.mode): fk_myDoc = models.ForeignKey(MyDoc, related_name="") --- How Can I use {% for line doc.X_set.all %} in the t

Re: Paginator and foreign key

2010-12-13 Thread bruno desthuilliers
On 13 déc, 16:59, refreegrata wrote: > Hello list, I have a question. Take a look to the next models. > > class MyDoc(models.Model): >     code = models.BigIntegerField() > > class Myline(models.mode): >    fk_myDoc = models.ForeignKey(MyDoc) >

Re: Paginator and foreign key

2010-12-13 Thread refreegrata
if I return another list: --- for i in range(len(paginatorDocs.object_list)): resultados = {'myDoc': paginatorDocs.object_list[i], 'myLines': Myline.objects.filter(fk_myDoc=paginatorDocs.object_list[i].id),} --- With this I