My previous answer is related to django. For flask I think you need to ask in a flask mailling list.
On Tue, May 19, 2015 at 12:18 PM, Adolphe Cher-Aime <achera...@gmail.com> wrote: > In your view try request.POST.getlist('oblast_select'). It will return > the selected values in a list. > > > > On Tue, May 19, 2015 at 12:01 PM, Reznov Ammar <reznov...@gmail.com> > wrote: > >> Hey guys, >> >> I've had created a search form, and i need to send a post request to my >> python file to get information . >> >> Here is my html code : >> >> <section class="search-form" style="display: block"> >> <div class="box"> >> <ul> >> <li> >> <label>Область/Город республиканского значения</label> >> <select id="oblast_select" name='oblast_select'> >> <option value="0">нет</option> >> <option value="5971">value1</option> >> <option value="7402">value2</option> >> <option value="5219">value3</option> >> <option value="4949">value4</option> >> <option value="5764">value5</option> >> <option value="7412">value6</option> >> <option value="6217">7</option> >> <option value="6802">8</option> >> <option value="6940">value9</option> >> </select> >> </li> >> </section> >> >> and here is my python file : >> >> @app.route('/serviceidlookup', methods=["GET", "POST"]) >> def serviceidlookup(): >> >> reload(sys) >> sys.setdefaultencoding("utf-8") >> sys.stdout.encoding >> >> serviceid = request.form.get('serviceid') >> areaid = request.form.get('areaid') >> con = psycopg2.connect(**config) >> cur = con.cursor() >> >> cur.execute("select ate,ate_type,name_kg,name_ru,name_en,parent from >> ate_history where ate in (select ate from street_ate where street in >> (select street from street_history where name_ru = '(*value of serviceid*)') >> and ate = '(*value of areaid*)')" %(serviceid,areaid)) >> entries = [dict(ate=row[0], ate_type=row[1], name_kg=row[2], >> name_ru=row[3], name_en=row[4], parent=row[5]) for row in cur.fetchall()] >> >> >> return render_template('lookup.html', serviceid=serviceid, >> entries=entries) >> >> What i need is the options texts to get inside serviceid and the values >> to get inside areaid !! >> >> please any help, because here i got confused really !!! >> >> -- >> 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 http://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/c341c1e2-6aab-4479-8f51-8f021775133b%40googlegroups.com >> <https://groups.google.com/d/msgid/django-users/c341c1e2-6aab-4479-8f51-8f021775133b%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > > > *Adolphe CHER-AIME* > -- 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 http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BfkitK35Sx-sjf8acCMAMNCas8Gk1JGOR%3DD8S7XywKZFMKipA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.