Python + django list + HTML select option

0

Good morning guys,

I need your help on a code I'm developing in python + django

Here's my problem: I have a function in views.py where I make a select of Name in the customer table and put the data (fetchall ()) inside a list, and send this list via template to the HTML page of display.

In the HTML page, I get the list via template and for each line of the list, I display an option with the value of the line in value and in the option's display name.

However, instead of appearing only the customer name Client Appears full of dirt from the list ('Customer',)

I have tried to replace on receive, but it is no longer a list and displays everything on one line only I have tried to dynamically send several templates, but you can not dynamically receive them also in HTML

If you can give me some idea that can solve this problem, I will be very grateful.

    
asked by anonymous 02.05.2017 / 14:31

0 answers