Show me your view. On Thu, Feb 12, 2015 at 2:49 PM, Ronaldo Bahia <[email protected]> wrote:
> Thanks for answering. > > Can you provide some example? > > Cheers > > Em quinta-feira, 12 de fevereiro de 2015 17:00:28 UTC-2, ke1g escreveu: >> >> I presume that your messages are model instances. If so, create a >> queryset for the unread messages in your view, and pass that, or the result >> of applying .count() to it, as a template context variable, say >> "unread_message_count". >> >> On Thu, Feb 12, 2015 at 1:06 PM, Ronaldo Bahia <[email protected]> >> wrote: >> >>> I am facing issues trying to get a count. Hope you can help me. >>> >>> In the template, if I insert {{ message.count }} not happens 'coz >>> message is a string. If I insert {% load inbox %} {% inbox_count as message >>> %} it returns all unread messages, but I need to get the unread messages >>> sent by a given user, in my case, a candidate to a job position. >>> >>> How can I do it? >>> Here is the thread: >>> http://stackoverflow.com/questions/28484620/issue-in- >>> django-count-string-in-a-template >>> >>> Thanx, >>> Ronaldo >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at http://groups.google.com/group/django-users. >>> To view this discussion on the web visit https://groups.google.com/d/ >>> msgid/django-users/c9a6fd12-9c3a-4ac0-a2ed-550c1bb56e21% >>> 40googlegroups.com >>> <https://groups.google.com/d/msgid/django-users/c9a6fd12-9c3a-4ac0-a2ed-550c1bb56e21%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/1322fcec-9c69-4d34-9e24-cd719061a469%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/1322fcec-9c69-4d34-9e24-cd719061a469%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAB%2BAj0uEsb%3D%2BUiHmvnKizVPbj%2BREKsD6MYSOqq_eCVM3TqHTvQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

