[web2py] Re: Interact Web2Py App with Android App Security

2015-10-03 Thread Leonel Câmara
> > Http.request("localhost:8080/mysite/controller/get_example") ; > // < i got a refused connection because that python line code > ("@auth.requires_login()"), > > //

[web2py] Re: Interact Web2Py App with Android App Security

2015-10-03 Thread Luis Valladares
What if you create a small REST service for login? in the case of login it can be a get request which sends the username and password (PREVIOUSLY HASHED) check if it exist in web2py database and return 1 if exists, 0 if it doesnt exist. You can connect to the rest service through HTTP request,

[web2py] Re: Error: widgetId is a required parameter (2.12.2)

2015-10-03 Thread Massimo Di Pierro
what is widget.js? It does not come with web2py. On Monday, 28 September 2015 04:58:10 UTC-5, Dennis Bauszus wrote: > > Web2py version 2.12.2. > > The admin site is throwing* Error: widgetId is a required parameter* from > the widget.js library. > > This is caused by the twitter-timeline link

Re: [web2py] keyError

2015-10-03 Thread 'Diogene Laerce' via web2py-users
Hi Alex, Le 03/10/2015 16:52, Alex Glaros a écrit : > Can someone please tell me what is wrong with syntax? > > Below is result of API data from geoNames.org > > location_data = > > | > {u'postalcodes':[{u'placeName':u'Del > Pante\xf3n',u'countryCode':u'MX',u'adminName3':u'Juan Rodr\xedguez >

[web2py] Re: Web2py celery plugin

2015-10-03 Thread Luis Valladares
But how can you exec a web2py task (who may uses web2py internal components like Request, response, db, etc..) with a external celery app? i mean, if i wish to execute a task, for example: To insert a new register in a table of my web2py database, and in enqueue this task to a remote (or local)

[web2py] keyError

2015-10-03 Thread Alex Glaros
Can someone please tell me what is wrong with syntax? Below is result of API data from geoNames.org location_data = {u'postalcodes': [{u'placeName': u'Del Pante\xf3n', u'countryCode': u'MX', u'adminName3': u'Juan Rodr\xedguez Clara', u'lat': 19.8537498, u 'postalcode': u'95694',

[web2py] Re: alias field names

2015-10-03 Thread 黄祥
perhaps you can use dal alias ref: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Self-Reference-and-aliases best regards, stifan On Saturday, October 3, 2015 at 3:03:45 PM UTC+7, Nguyen Minh Tuan wrote: > > Hi all, > > My situation is that I have to work with

[web2py] Re: Interact Web2Py App with Android App Security

2015-10-03 Thread Relsi Maron
Enable basic authentication [1 ]: auth.settings.allow_basic_login = True so: https://user:password@http://localhost:8080/mysite/controller/get_example [1]

[web2py] API

2015-10-03 Thread PAVAN DHAVALESWARAPU
How can I use API in web2py modules ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google

[web2py] Re: Interact Web2Py App with Android App Security

2015-10-03 Thread Fábio Filho
i thought i can use this session in my schema... but really, i have no idea what i need to do ... i read something about base authentication in Web2Py, is this helpful? Em sexta-feira, 2 de outubro de 2015 19:47:09 UTC-3, Niphlod escreveu: > > what authentication do you want to support ?

[web2py] Re: Web2py/Apache accessible via multiple host names

2015-10-03 Thread Michael Suelmann
Hello Niphlod, The double WSGIScriptAlias is because the web2py apps aren't the only thing served by apache, so I can't just alias everything to wsgihandler.py. Actualy there are some more WSGIScriptAlias as there are more web2py apps on the server. Anyway, I did a test with just the following

Re: [web2py] API

2015-10-03 Thread Kiran Subbaraman
Can you provide more details - which API are you talking about? Are you thinking of creating APIs for your web2py application - see this for some ideas: http://web2py.com/books/default/chapter/29/10/services?search=REST#Remote-procedure-calls, and

Re: [web2py] keyError

2015-10-03 Thread Alex Glaros
Single item works Diogene your_country = (db.Country.countryCode == location_data['postalcodes'][5]['countryCode']) how all of the values be accessed. See my guess below: your_country = (db.Country.countryCode == location_data['postalcodes'][ALL ]['countryCode']) thanks, Alex -- Resources:

[web2py] Re: API

2015-10-03 Thread Anthony
If you would like to access the web2py API from a module, see http://web2py.com/books/default/chapter/29/04/the-core#Accessing-the-API-from-Python-modules. Anthony On Saturday, October 3, 2015 at 11:08:31 AM UTC-4, PAVAN DHAVALESWARAPU wrote: > > How can I use API in web2py modules ? > --

Re: [web2py] keyError

2015-10-03 Thread Alex Glaros
Hi Denes, sorry, I want all the countries. For example, if zip, is 95694, it exists in more than one country, I display all countries and let user choose their country. What is syntax for all? I've tried a million combinations, read tutorials, and cannot find examples in discussion groups.

Re: [web2py] keyError

2015-10-03 Thread 'DenesL' via web2py-users
The location_data received from geoNames can contain more than one country code, your first sample has 3: MK DE US. Your second sample has only one: MX By the name of the variable being used (your_country) I assume you want to get only one postalcode. In any case you could use:

[web2py] login_bare custom validation

2015-10-03 Thread 'DenesL' via web2py-users
Hello all, Trying to do a custom validation using login_bare, which I have never needed before, but I get a ticket shown below, it includes the minimalist code to reproduce it. The view just shows the form. Using authentication by username: auth.define_tables(username=True, signature=False)

Re: [web2py] keyError

2015-10-03 Thread 'DenesL' via web2py-users
[x['countryCode'] for x in location_data['postalcodes']] will give you an array of the country codes in location_data, but note that you could have duplicated entries. If you don't want duplicates you could do: cc=[] for x in location_data['postalcodes']: c=x['countryCode'] if c not in cc:

[web2py] Re: alias field names

2015-10-03 Thread Nguyen Minh Tuan
Hi all, My situation is that I have to work with already defined tables. There is a field name 'pass', this is keyword of Python, I don't how to solve this. So I think alias for table field is necessary. Anyone can suggest for this situation? Thanks in advance! Regards, Tuan. -- Resources: -