[web2py] Re: anyserver in 2.16.1-stable

2018-06-14 Thread Massimo Di Pierro
I think you installed this: https://pypi.org/project/motor/ The anyserver.py refers to some other motor package which I googled and I can no longer find. On Friday, 15 June 2018 05:05:17 UTC+2, 黄祥 wrote: > > $ which motor > $ python -V | pip list | grep motor > Python 2.7.15 :: Anaconda, Inc. >

[web2py] Re: return binary

2018-06-14 Thread 黄祥
submit on this : https://github.com/web2py/web2py/issues pls related the description with this google group discussion (url) best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/

[web2py] Re: return binary

2018-06-14 Thread lucas
thank you, that would be wonderful. where do I open the ticket? -- 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

[web2py] Re: Other login methods

2018-06-14 Thread 黄祥
yes, actually for email_auth or ldap_auth. ATM, email_auth is tested using from domain hosting (add it from cpanel). email_auth, ldap_auth and pam_auth tested above is using the real data and also tested for the fake data (just for testing) best regards, stifan -- Resources: - http://web2py.co

[web2py] Re: anyserver in 2.16.1-stable

2018-06-14 Thread 黄祥
$ which motor $ python -V | pip list | grep motor Python 2.7.15 :: Anaconda, Inc. motor1.2.2 $ python >>> import motor >>> motor.WSGIContainer Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'WSGIContainer' best regards, stifan --

[web2py] Re: include python libraries that needed in web2py app to distribute to another

2018-06-14 Thread 黄祥
clear enough, thx for detail explaination, massimo. tested using pyinstaller, but end with error best regards, stifan -- 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

[web2py] Re: not all arguments converted during string formatting

2018-06-14 Thread Massimo Di Pierro
this connection string is wrong: DAL('firebird:// sysdba:masterkey@127.0.0.1/C://Development//BazyCmms//bhp//BHP.FDB') 'C://Development//BazyCmms//bhp//BHP.FDB 'should be a database name, not a flename with / On Thursd

[web2py] Re: return binary

2018-06-14 Thread Massimo Di Pierro
We would need to create a custom adapter for this. Not hard to do, please open a ticket and we will get it done. On Thursday, 14 June 2018 06:54:51 UTC+2, lucas wrote: > > so this is what i got working wonderfully but using psycopg2 directly > instead of the DAL. AGAIN, i would love to convert

[web2py] Re: anyserver in 2.16.1-stable

2018-06-14 Thread Massimo Di Pierro
based on this it should work: https://www.programcreek.com/python/example/106961/motor.WSGIContainer can you try from shell: import motor motor.WSGIContainer maybe you installed something else called motor? On Monday, 11 June 2018 02:01:52 UTC+2, 黄祥 wrote: > > web2py version 2.16.1-stable > pyt

[web2py] Re: Other login methods

2018-06-14 Thread Anthony
Are you planning to actually use any of these methods? If so, I would suggest setting them up properly with real authentication services, and only then report back if you are receiving errors. They are not necessarily supposed to work as expected with dummy inputs. Anthony On Thursday, June 14

[web2py] Re: include python libraries that needed in web2py app to distribute to another

2018-06-14 Thread Massimo Di Pierro
1) You can only include in modules/ pure python modules and, even in that case, not all of them work f they expect to be in "site-packages". 2) the difference is that by putting modules in the app/modules folder, they will be distributed with your app and user does not need to call pip. Also pip

[web2py] Re: requires_verification = False not working with custom auth table

2018-06-14 Thread Massimo Di Pierro
I think it is best to set the settings in the model where you define_tables() but your code should work. Anthony, is right, show us the full index() On Wednesday, 6 June 2018 23:40:48 UTC+2, b.l. masters wrote: > > I feel like I must be missing some basic step here. So would I put these > setti

[web2py] Re: Making my custom layouts

2018-06-14 Thread Massimo Di Pierro
Look also the layout that comes with the welcome app (layout.html). Look at the {{}} tags in there. Than take any web page you want and add the same {{...}} tags. {{include}} is the most important as it determine the inclusion point, where extending views are placed. On Tuesday, 5 June 201

[web2py] Re: ADD TO CART BUTTON

2018-06-14 Thread Massimo Di Pierro
notice that productId = request.vars.productId userId = session.auth.user.id sql = "INSERT INTO orders (productId, userId, qty, order_date) values (str(productId), str(userId), str(qty), str(order_date))" #sql = sql + "(" + str(productId) + "," + str(userId) + "," + str(qty) + "," +

[web2py] Re: Loading Scheduler Configuration On-the-Fly

2018-06-14 Thread Massimo Di Pierro
You have to crate a function that given the request.vars.client_name creates the db object and calls the define_table's In your model you have request.vars.client_name and you can call that function. In your tasks you would call that function from your task with a parameter specfied when you enq

[web2py] Re: Select ALL products

2018-06-14 Thread Massimo Di Pierro
t is not clear what you want to do. Can you explain without code the relation between your tables and the behavior you want to see? On Monday, 4 June 2018 21:11:05 UTC+2, Ayron Rangel wrote: > > Guys, me again o.O > > > How can I select all products according to the same model? I'm using modal >

[web2py] Re: Other login methods

2018-06-14 Thread 黄祥
thanks for the detail explaination, Anthony. moral of tested other login method: either use auth.settings.login_methods.append(your_choosen_login_method() ) or use auth.settings.login_methods = [your_choosen_login_method() ] # this one to eliminate the default auth method tested work : pam() not

[web2py] Re: Other login methods

2018-06-14 Thread Anthony
> > *email_auth* > 2. models/db.py > from gluon.contrib.login_methods.email_auth import email_auth > auth.settings.login_methods.append( > email_auth("smtp.one.com:587", "@one.com")) > auth.settings.login_methods = [email_auth] > Again, same problem here. This one is tricky because email_auth

[web2py] Re: Other login methods

2018-06-14 Thread Anthony
> > *pam_auth* > 2. models/db.py > auth.define_tables(username=True, signature=False) > from gluon.contrib.login_methods.pam_auth import pam_auth > auth.settings.login_methods.append(pam_auth()) > auth.settings.login_methods = [pam_auth] > Same problem as with basic auth -- the .append() has no e

[web2py] Re: Other login methods

2018-06-14 Thread Anthony
> > *basic_auth* > 2. models/db.py > from gluon.contrib.login_methods.basic_auth import basic_auth > auth.settings.login_methods.append( > basic_auth('https://one.one.com')) > auth.settings.login_methods = [basic_auth] > First, note that the .append() is pointless, as the next line completely

[web2py] Re: Other login methods

2018-06-14 Thread Anthony
> > *gae_google_login* > 2. models/db.py > from gluon.contrib.login_methods.gae_google_login import GaeGoogleAccount > auth.settings.login_form = GaeGoogleAccount() > auth.settings.login_methods = [GaeGoogleAccount] > > Should be gluon.contrib.login_methods.gae_google_account. The book should be

[web2py] Re: Other login methods

2018-06-14 Thread Anthony
> > *basic_auth* > 2. models/db.py > from gluon.contrib.login_methods.basic_auth import basic_auth > auth.settings.login_methods.append( > basic_auth('https://one.one.com')) > auth.settings.login_methods = [basic_auth] > The .append() above is pointless, as the next line completely overwrites

[web2py] Re: Other login methods

2018-06-14 Thread 黄祥
forgot to tell for *email_auth *expected result: can not login because not sure have smtp.one.com:587 and the domain name in configuration is one.com but the tested login using b.com best regards, stifan On Friday, June 15, 2018 at 5:41:57 AM UTC+7, 黄祥 wrote: > > test another login method seem

[web2py] Re: How to do list: reference and list: interger work together

2018-06-14 Thread Anthony
On Thursday, June 14, 2018 at 5:23:09 PM UTC-4, Guilherme Germano Silva wrote: > > I've this table > db.define_table('Kits', > Field('Nome'), > Field('ID_EntradaProdutoEstoque', 'list:reference > EntradaProdutoEstoque'), > Field('QuantidadeProdutos'

[web2py] Other login methods

2018-06-14 Thread 黄祥
test another login method seems not work too, step i took 1. create new web2py app 2. use code from book and use it on models/db.py *ref:* http://web2py.com/books/default/chapter/29/09/access-control#Other-login-methods-and-login-forms 3. test with wrong username, email or password *basic_auth* 2.

[web2py] How to do list: reference and list: interger work together

2018-06-14 Thread Guilherme Germano Silva
I've this table db.define_table('Kits', Field('Nome'), Field('ID_EntradaProdutoEstoque', 'list:reference EntradaProdutoEstoque'), Field('QuantidadeProdutos', type='list:integer'), Field('QuantidadeKits', type='integer')

[web2py] not all arguments converted during string formatting

2018-06-14 Thread Tomasz Sokołowski
I have a problem with creating a new table in web2py. db.py: # -*- coding: utf-8 -*- dbf = DAL('firebird://sysdba:masterkey@127.0.0.1/C://Development//BazyCmms//bhp//BHP.FDB') dbf.define_table('tabela_trzy', Field('kolumna', 'string')) than: Error ticket for "arcelormittal" Ticket ID 127.0.0

Re: [web2py] Is it possible to translate data in SQLFORM.grid?

2018-06-14 Thread Bruno Duarte Ramos
Hello, Is is possible translate a data in a SQLFORM? Where my controller is: form=SQLFORM(db.cake) And my view: {{=form}} thanks. Em quinta-feira, 30 de julho de 2015 04:38:01 UTC-3, Massimiliano escreveu: > > Have you tried? > > db.cake.fruit.represent = lambda v, r: T(db.fruits[v].name) >

Re: [web2py] Re: LDAP Authentication never work

2018-06-14 Thread 黄祥
yes, you are right, pardon, my bad, never tested for wrong username, email or password condition *e.g. ldap_auth have strange behaviour even the wrong username, email or password entered with wrong server configuration can let user to logged in* *models/db.**py* #auth.define_tables(username=True,

Re: [web2py] Re: LDAP Authentication never work

2018-06-14 Thread Suhas Jadhav
Hi stifan, Thaks for checking my issue. I uninstalled python 3 and install Python 2.7.15 Not the application is allowing me to log in. But even if I give incorrect username and password it shows successful login. What might be wrong? Thanks, Suhas On Wed, Jun 13, 2018 at 2:06 AM 黄祥 wrote: >