En el método del view, no estás regresando la colección de objetos tipo Medio.

Sent from my iPhone

> On Nov 11, 2015, at 12:19 PM, miguel angel lopez mendo <[email protected]> 
> wrote:
> 
> ----------------view------------
> 
> def medios(request):
>         medios = Medio.objects.filter()
>         template = 'products/Clientes.html'
>         print medios
>     return render(request, template, locals())
> 
> 
> --------model-----------------
> 
> class Medio (models.Model):
>     nombre_medio = models.CharField(max_length=50)
> 
>     def __unicode__(self):
>         return  self.nombre_medio
> 
> 
> --------template--------------
> <option value="" selected="selected">Selecciona una opcion </option>
>  {% for medio in medios %}
> <option >{{ medios.nombre_medio }}</option>
>     {% endfor %}
> 
> </select></p>
> 
> 
> 
> No se cual es el error no me muestra los medios que tengo registrados 
> -- 
> 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/d9d6474b-6046-4abc-b097-51f7b67b6429%40googlegroups.com.
> 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/03A38916-A316-4B0F-BC54-66A48257285C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to