Hi, please try this: <option value="{{ machine.product_name }}">
BTW, I would use the form library of django. It helps you to reduce bugs and ist easy to use. Rule of thumb: Don't access request.GET or request.POST. Give one of these dictionaries to your form. Thomas Govindarajan wrote: > First off I have to say that I am new to django. I am trying to get a > value from drop down select in HTML part. This value has spaces in it. > However, when I retrieve it in the view code only the text up to the > first space gets retrieved. Is there a to retrieve the whole string > with all the spaces preserved? > > Thanks, > Govind > > > > HTML TEMPLATE: > > <select name="machine"> > <option value='all'>ALL</option> > {% for machine in machines %} > > <option value= {{ machine.product_name }} > {{ machine.product_name}} > </option> > {% endfor %} > </select> > > > find.py: > > if key == 'product': > value = request.GET['product'] > Log('%s' %value) > if not (value == 'all'): > cores = cores.filter(product__build_num=value) > -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.