----------------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.

Reply via email to