Sorry for the stupid question, but how? Thanks.

*views.py :*

from django.shortcuts import render_to_response, get_object_or_404from 
django.template import RequestContextfrom models import *
def film(request):
    film = Film.objects.order_by("titolo")
    return render_to_response('Film.html', { 'film': film, })
def film_attore(request, id):
    attore = get_object_or_404( Attore, pk=id )
    return render_to_response('Attore.html', { 'film': Film.objects.filter( 
attori=attore ), 'attore': attore })

*Attore.html : this is what i tried, but it doesn't work. *


{% extends "Base.html" %}
{% block titolo %}Attore{% endblock %}
{% block contenuto %}
  {% for act in attore %}      <h2>{{ act.nome }} {{ act.cognome }}</h2>  {% 
endfor %}{% endblock %}

*It said *
Exception Value:

'Attore' object is not iterable

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to