Sorry, my previous answer was senseless, I realized that just after adding
it.
1) You can filter jobs in appname/views.py:
queryset = Job.objects.filter(name__contains="job")
2) and people in template /appname/templates/jobs_list.html:
{% for job in object_list %}
<h1>{{ job.name }}</h1>
{% for person in job.person_set.all %}
{% if person.name|length <= 4 %}
{{ person.name }} {{ person.surname }}
{% endif %}
{% empty %}
Nobody works there.
{% endfor %}
I still find that 2) inefficient, but could do anything else. Read
something about registering filters that I do not understand that well,
sorry.
--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/b526f1a0-ee67-4988-8374-e5d0a5bc4f6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.