Drop down menu still not showing... Forgot to say navbar.html is inherited in base.html. I created a view .def navbar(request): airlines= Airline.objects.all() template = 'navbar.html' context = { 'airlines': airlines, }
return render(request, template, {}) Il giorno mercoledì 6 luglio 2016 16:27:41 UTC+2, pythonc...@gmail.com ha scritto: > > Hi, > I have a model and whould like to create a dropdown menu from the fields > generated. > Unfortunately no dropdown list is showed: > <ul class="dropdown-menu" > > {% for airline in alirlines %} > > <li><a href="/airline_detail/{{airline.code}}">{{ > airline.airline }}</a></li> > {% endfor %} > > </ul> > > this is the model: > class Airline(models.Model): > airline = models.CharField(max_length=50) > prefix = models.CharField(max_length=3) > code= models.CharField(max_length=3) > ticker = models.CharField(max_length=1) > > > can anyone help? thanks > -- 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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. 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/5261e7bd-3a2a-4f7f-917e-8c8f2879db52%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.