Re: _set.all in a template with no results

2021-04-23 Thread Walter Randazzo
gt; Hi there, I am trying to list in a template a bunch of fields of the > model (PagosDetail) that is related to another one (PagosHead) via > numero_pago field. > > I am able to list the PagosHead items in the template but when I use the > " _set.all" in order to get t

_set.all in a template with no results

2021-04-23 Thread Walter Randazzo
Hi there, I am trying to list in a template a bunch of fields of the model (PagosDetail) that is related to another one (PagosHead) via numero_pago field. I am able to list the PagosHead items in the template but when I use the " _set.all" in order to get those fields from PagosD

Re: _set.all in template should be simple, wood and trees maybe?

2012-11-29 Thread MikeKJ
Perfect, thanks On Thursday, November 29, 2012 3:48:41 PM UTC, ke1g wrote: > > You have specified related_name to the foreign key in HotTopic. Try > either taking that out, or using newsletter_instance.letter_set.all . > -- You received this message because you are subscribed to the Google Gro

Re: _set.all in template should be simple, wood and trees maybe?

2012-11-29 Thread Bill Freeman
You have specified related_name to the foreign key in HotTopic. Try either taking that out, or using newsletter_instance.letter_set.all . -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegr

Re: _set.all in template should be simple, wood and trees maybe?

2012-11-29 Thread carlos
{% for x in list %} {{x.text}} {% for t in x.hot_topic_set.all %} {{ t.topic }} {% endfor %} {% endfor %} try only erase the if tag work for me !! On Thu, Nov 29, 2012 at 9:17 AM, MikeKJ wrote: > Good question, I have attempted to shell the problem out and no I dont get

Re: _set.all in template should be simple, wood and trees maybe?

2012-11-29 Thread MikeKJ
Good question, I have attempted to shell the problem out and no I dont get a dataset returned, I should do as NewsLetter is foreignkeyed to Hot_Topic and Hot_Topic_Inline is an inlines to NewsLetterAdmin so the models are definately related -- You received this message because you are subscrib

_set.all in template should be simple, wood and trees maybe?

2012-11-29 Thread MikeKJ
I dont get the hot_topic_set.all from the newsletter instance x and I really don't see why can anyone else please? model: class NewsLetter(models.Model): title = models.CharField(max_length=200) text = models.TextField(null=True, blank=True) document = models.FileField(upload_to="news

Re: _set.all()

2012-07-27 Thread David
hmm nvm print unicode(a) seems to do the trick. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/KR3z7jzCPusJ. To post to this group, send email to django-

_set.all()

2012-07-27 Thread David
Hello This may be more of a Python question that a Django question, but ... I am trying to make one of my apps more abstract. Using _set.all() I can return all of the m2m relations. I can then loop through them doing what I like *providing *I know the model field names. if not isinstance(f

Re: Using _set.all in template when ForiegnKey is linked to Self

2012-03-23 Thread Jam
t; Hi All, >> >> I have a model where it can link to itself using ForeignKey('self'). This >> is so I can have parent and child objects. >> >> I have called the parent and in the template I want to be able to access >> all the child objects. >>

Re: Using _set.all in template when ForiegnKey is linked to Self

2012-03-22 Thread Daniel Roseman
> all the child objects. > > I have been using the _set.all template command on the field but it > returns no results. > > Any ideas why this would happen? This is the first time I have used > ForeignKey('self') so I am a bit clueless. > > Thank you all >

Using _set.all in template when ForiegnKey is linked to Self

2012-03-22 Thread Jam
Hi All, I have a model where it can link to itself using ForeignKey('self'). This is so I can have parent and child objects. I have called the parent and in the template I want to be able to access all the child objects. I have been using the _set.all template command on the fi

generic detail info view displaying _set.all()

2007-05-02 Thread Tobias Bender
Hi. Assuming I have these models: #models.py class Publisher(models.Model): name = models.CharField(maxlength=30) street = models.CharField(maxlength=30) class Book(models.Model): name = models.CharField(maxlength=30) publisher = models.ForeignKey(Publisher) What do I have to