Re: How to get selects option value !!

2015-05-19 Thread Tom Evans
On Tue, May 19, 2015 at 5:13 PM, Reznov Ammar  wrote:
> oh dude yes am doing flask, but you know here doesn't exist any flask group,
> so please if you can help it would be really appreciated :) .

http://flask.pocoo.org/mailinglist/

HTH

Tom

-- 
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/CAFHbX1KWs9BYThOKxyRbZiABZnY5E%2Bzf44%2BMF0kJbXWXVQ1fCw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to get selects option value !!

2015-05-19 Thread Adolphe Cher-Aime
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 
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 
> 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 :
>>
>>   
>> 
>>   
>> 
>>   Область/Город республиканского значения
>>   
>> нет
>> value1
>> value2
>> value3
>> value4
>> value5
>> value6
>> 7
>> 8
>> value9
>>   
>> 
>> 
>>
>> 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
>> 
>> .
>> 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.


Re: How to get selects option value !!

2015-05-19 Thread Adolphe Cher-Aime
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  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 :
>
>   
> 
>   
> 
>   Область/Город республиканского значения
>   
> нет
> value1
> value2
> value3
> value4
> value5
> value6
> 7
> 8
> value9
>   
> 
> 
>
> 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
> 
> .
> 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%2BfkitKe9H8VdUVaTRzL%2BxxnnJ4xvBsRBYUPTX5OGRJ_9aD8Ew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to get selects option value !!

2015-05-19 Thread Reznov Ammar
oh dude yes am doing flask, but you know here doesn't exist any flask 
group, so please if you can help it would be really appreciated :) .

On Tuesday, May 19, 2015 at 10:06:10 PM UTC+6, aRkadeFR wrote:
>
>  Are you sure you're doing Django?
>
> It looks like flask to me.
>
> On 05/19/2015 06:01 PM, Reznov Ammar 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 :
>
>
> 
>   
> 
>   Область/Город республиканского значения
>   
> нет
> value1
> value2
> value3
> value4
> value5
> value6
> 7
> 8
> value9
>   
> 
>  
>
>  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...@googlegroups.com .
> To post to this group, send email to django...@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
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> -- 
> aRkadeFR
>
> 

-- 
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/08a968cb-a260-4637-863b-834369964f8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to get selects option value !!

2015-05-19 Thread aRkadeFR

Are you sure you're doing Django?

It looks like flask to me.

On 05/19/2015 06:01 PM, Reznov Ammar 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 :

  

  

  Область/Город республиканского значения
  
нет
value1
value2
value3
value4
value5
value6
7
8
value9
  



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 
.

For more options, visit https://groups.google.com/d/optout.


--
aRkadeFR

--
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/555B5F36.5010204%40arkade.info.
For more options, visit https://groups.google.com/d/optout.


How to get selects option value !!

2015-05-19 Thread Reznov Ammar
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 :

  

  

  Область/Город республиканского значения
  
нет
value1
value2
value3
value4
value5
value6
7
8
value9
  



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.
For more options, visit https://groups.google.com/d/optout.