Hi,
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?

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

In this template if machine.product_name = 'PowerEdge 2950' and I select it
as an option value then in the below code
I get only  'PowerEdge' and not '2950' .

*
views/ find.py:*

 if key == 'product':
          value = request.GET['product']
          Log('%s' %value)
   ////// here value is only  'PowerEdge' and not '2950'
          if not (value == 'all'):
             cores = cores.filter(product__build_num=value)


Can someone please suggest how to get the complete string ?

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

Reply via email to