[web2py] Re: edit or delete child or detail table on SQLFORM.grid with left join

2017-03-20 Thread 黄祥
could anyone give an example to custom button in grid that does an ajax query? another question is oot : what is the best practice to define table for transaction that separated for header and detail? when use header and detail it good for normalisation but not good in operational, in case

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-03-20 Thread Jim Steil
I've got 2.7 in my space even though it is labeled 3.4.4. [image: Inline image 1] and you can use the python3 command to get into python3 [image: Inline image 2] -Jim On Mon, Mar 20, 2017 at 5:16 PM, 'DenesL' via web2py-users < web2py@googlegroups.com> wrote: > Litmis only has Python-3.4.4

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-03-20 Thread 'DenesL' via web2py-users
Thanks Ramos. Python 2.7.11 at pub400. Can you guys provide a save file to FTP to pub400? they are running v7r3m0. Denes On Monday, March 20, 2017 at 10:23:34 AM UTC-4, Ramos wrote: > > Iseries 7.x in the cloud > > http://pub400.com/ > > tutorial about iseries using pub400 > >

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-03-20 Thread 'DenesL' via web2py-users
Litmis only has Python-3.4.4 On Monday, March 20, 2017 at 10:08:07 AM UTC-4, Jim S wrote: > > Are you familiar with Aaron Bartell's work and litmis spaces? > spaces.litmis.com > > There you can get a free PASE session on their boxes. Use the code BETA > when signing up. Let me know if you

[web2py] Re: Trying to use Field.represent for 'blob' type in SQLFORM.grid (works in appadmin?)

2017-03-20 Thread Massimo Di Pierro
It is a bug in grid. I just pushed a new version on github that allows you to do SQLFORM.grid(...,showblob=True) On Monday, 20 March 2017 13:52:53 UTC-5, Jordan Myers wrote: > > Hello, > > I am trying to display a Field that has type 'blob' in a SQLFORM.grid. The > data is NOT user-uploaded,

[web2py] Re: Retrieve other fields from the LDAP database

2017-03-20 Thread Dave S
On Monday, March 20, 2017 at 6:40:04 AM UTC-7, John Freking wrote: > > I have used LDAP login with MS Active Directory and I added the extra > fields for names and emails to the AUTH_USER table. > > [ldap_auth(mode='ad', > manage_user=True, > user_firstname_attrib = 'givenName', >

Re: [web2py] Retrieve other fields from the LDAP database during login

2017-03-20 Thread Dave S
Duplicate. See /dps On Monday, March 20, 2017 at 6:38:44 AM UTC-7, John Freking wrote: > > I'm using LDAP AUTH with MS Active Directory and I added three extra > fields for names and email. The three fields are. > >

[web2py] Re: server rocket

2017-03-20 Thread Dave S
On Monday, March 20, 2017 at 7:39:23 AM UTC-7, Елена Серебрянникова wrote: > > Hello. Necessary remote admin via the rocket. Please tell me. > You either need to set up Rocket to handle https (which involves telling it about your certificates, otherwise it sends a default list that clients

[web2py] Trying to use Field.represent for 'blob' type in SQLFORM.grid (works in appadmin?)

2017-03-20 Thread Jordan Myers
Hello, I am trying to display a Field that has type 'blob' in a SQLFORM.grid. The data is NOT user-uploaded, thus I cannot use the typical uploadfield + request.download pattern. I am using blob because I need to store important algorithm-generated data that is too large to fit in the 'text'

[web2py] Re: Not able to connect to a database other than admin in mongodb using authorization

2017-03-20 Thread Massimo Di Pierro
This may not be a web2py/pydal issuer. Can you connect using pymongo with a password? On Monday, 20 March 2017 08:41:28 UTC-5, vikas mittal wrote: > > I am trying to connect to the mongodb/ > mongodb has three databases as of now admin, local and another one i > created with the name vikdata

[web2py] Re: How to add header in soap request using pysimple soap

2017-03-20 Thread Massimo Di Pierro
I would recommend you ask to the pysimplesoap authors. On Monday, 20 March 2017 08:37:06 UTC-5, Aafak Mohammad wrote: > > Hi i am using pysimplesoap latest api with python 2.6 just want to add > header in my request how i can do that? > following is my code i am trying > > client =

[web2py] Re: Unable to start a server

2017-03-20 Thread Massimo Di Pierro
My guess is you have previuosly run web2py with sudo or installed web2py sudo. rm /home/www-data/web2py/parameters_8000.py it is exists and make sure the user starting web2py has permission to read and write the web2py folder. Massimo On Monday, 20 March 2017 08:36:19 UTC-5, Rasmus Kreiner

[web2py] Re: UnboundLocalError: local variable 'books' referenced before assignment

2017-03-20 Thread Mirek Zvolský
This has nothing with Web2py but with Python. Try this: >>> a = 5 >>> def f(): if False: a = 3 return a >>> f() UnboundLocalError: local variable 'a' referenced before assignment And this is exactly what you have in vote_callback() with variable books. Python can with variables from outer scope

[web2py] Re: UnboundLocalError: local variable 'books' referenced before assignment

2017-03-20 Thread Anthony
Show the full traceback and indicate the line of code actually throwing the error. On Monday, March 20, 2017 at 9:38:38 AM UTC-4, Joe Dunst wrote: > > > I'm trying to make a "vote up" and "vote down" feature in my program, like > the one in reddit.com. But I've been receiving tickets from 2

Re: [web2py] Re: Comparar hash dinamicamente em uma consulta

2017-03-20 Thread Rodrigo attique santana
Sorry me, I did not know I was in the international group. My question is this, I have the structure below: Clients = db.define_table('clients' ,Field('name') ,Field('document',unique=True)

[web2py] Re: Smartrgrid verify old value on record before update

2017-03-20 Thread Anthony
> def is_bigger(form): > idUpdate = request.args(3).first > What is .first supposed to do? > r = db(db.t_myTable.f_quantity==idUpdate.id).select() > The above returns a Rows object -- you need to extract the Row from it -- so, use .select().first(). Anthony -- Resources: -

[web2py] Re: RuntimeError: no driver available ('pymongo',) - Windows 8.1

2017-03-20 Thread Anthony
You are responsible for installing the drivers for any databases you want to use (with the exception of SQLite, as the Python standard library includes its own interface). For PyMongo, see http://api.mongodb.com/python/current/installation.html. Anthony On Monday, March 20, 2017 at 9:41:33 AM

[web2py] Re: SQLFORM() as input to create query for SQLFORM.Grid

2017-03-20 Thread Anthony
query = ((db.paymenttype.id == request.vars.paymenttype) & (db.tariffrate.rate < request.vars.tariffrate) & [more conditions based on request.vars] & [conditions joining

[web2py] Re: Insert record with dynamic multiples fields

2017-03-20 Thread Anthony
db_handle.MYTAB.insert(**wFields) Anthony On Monday, March 20, 2017 at 9:42:38 AM UTC-4, dicolla wrote: > > I'd like to convert this static INSERT command: > > db_handle.MYTAB.insert(date='1212121', time='99' ) > > in a dynamic command like this: > > wFields=[] > wFields.append(

[web2py] Re: Quick few questions

2017-03-20 Thread Anthony
On Monday, March 20, 2017 at 9:38:00 AM UTC-4, paul...@gmail.com wrote: > > Howdy. I have a task with web2py. This is my first experience. My > background is in Flask/Django. Here are a few quick questions: > > 1. I have an image in the a database. The model is defined like this: > >

[web2py] inner join taking too long

2017-03-20 Thread 'John Philip' via web2py-users
Hi there, I have two tables that I have queried using an inner join the query outputs about 50,000 + records this is no problem on sqlite however it does not seem to load on web2py. Is there something I am doing wrong? import json def get_dpc(): rows =

Re: [web2py] Re: edit or delete child or detail table on SQLFORM.grid with left join

2017-03-20 Thread Fabiano Almeida
Thanks Massimo, I will try this. 2017-03-20 11:41 GMT-03:00 Massimo Di Pierro : > Unfortunately not out of the box. You need a custom button that does a > ajax query. > > > On Friday, 3 March 2017 17:52:30 UTC-6, 黄祥 wrote: >> >> is it possible to edit or delete child

[web2py] Re: Smartrgrid verify old value on record before update

2017-03-20 Thread Santiago Cartasegna
I have made a workarround. if (request.args[1] == 'edit'): #obtenemos el id del campo a modificar idUpdate = request.args[3] El lunes, 20 de marzo de 2017, 10:40:23 (UTC-3), Santiago Cartasegna escribió: > > Hello, > > I am trying to do some validation before updating a record.

Re: [web2py] Re: web2py + apache2 can't load Theano (Ubuntu Server 14.04)

2017-03-20 Thread Jordan Myers
Thank you for the reply. Apparently the issue was only when I tried to import theano in a controller. This worked with the rocket server, but not with Apache for some reason. Moving the code to a module and only invoking it with my web2py_scheduler service solved the issue (an immediate response

[web2py] Re: Radius Authentication

2017-03-20 Thread Massimo Di Pierro
Does this help? web2py/gluon/contrib/login_methods/loginradius_account.py On Tuesday, 14 March 2017 15:31:22 UTC-5, Fabiano Almeida wrote: > > Hi All! > > Is it possible to authenticate web2py users through the freeradius server? > > Thx > -- Resources: - http://web2py.com -

[web2py] Re: edit or delete child or detail table on SQLFORM.grid with left join

2017-03-20 Thread Massimo Di Pierro
Unfortunately not out of the box. You need a custom button that does a ajax query. On Friday, 3 March 2017 17:52:30 UTC-6, 黄祥 wrote: > > is it possible to edit or delete child or detail table on SQLFORM.grid > with left join? > i've tried before it seems the edit is for the first table

[web2py] Re: web2py + apache2 can't load Theano (Ubuntu Server 14.04)

2017-03-20 Thread Massimo Di Pierro
How is theano installed? Could it be apache2 is using a different pythonversion? In any case, I recommend you use Nginx over Apache. On Monday, 6 March 2017 14:17:10 UTC-6, Jordan Myers wrote: > > Hello > > I've migrated my code to start using Apache2 after successful setup just > using

[web2py] server rocket

2017-03-20 Thread Елена Серебрянникова
Hello. Necessary remote admin via the rocket. Please tell me. -- 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] wiki demo local variable 'gid' referenced before assignment

2017-03-20 Thread Arthur Gilbert
Just started web2py. I got the above error at http://127.0.0.1:8000/wikidemo/default/index. What am I doing wrong? -- 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

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-03-20 Thread António Ramos
Iseries 7.x in the cloud http://pub400.com/ tutorial about iseries using pub400 https://www.youtube.com/watch?v=vTOC0YXs9Ts 2017-03-20 14:07 GMT+00:00 Jim Steil : > Are you familiar with Aaron Bartell's work and litmis spaces? > spaces.litmis.com > > There you can get a

[web2py] Re: Quick few questions

2017-03-20 Thread Jim S
I'm not sure about questions 1 and 2, but for 3 and 4... 3. Look at SQLFORM.grid in the book - http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-grid 4. You wouldn't add them to 'membership' admin, but to 'group' admin. Something like

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-03-20 Thread Jim Steil
Are you familiar with Aaron Bartell's work and litmis spaces? spaces.litmis.com There you can get a free PASE session on their boxes. Use the code BETA when signing up. Let me know if you have any questions. -Jim On Mon, Mar 20, 2017 at 8:56 AM, 'DenesL' via web2py-users <

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-03-20 Thread 'DenesL' via web2py-users
Last summer uh? Not keeping up with i news lately... I looked it up as soon as I saw your post today, that is why I said it seems to need a modified adapter to map things thru ibm_db. It might be fairly easy and I would like to help but the lack of a newer i box to test with doesn't help.

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-03-20 Thread Jim Steil
Ok, last summer in the US. I think it was in July of 2016 but not sure. On Mon, Mar 20, 2017 at 8:39 AM, José Ricardo Borba wrote: > Last summer? We are in summer! > > 2017-03-20 10:31 GMT-03:00 Jim S : > >> Yes, support became available for Python 2

Re: [web2py] real name of auth tables

2017-03-20 Thread Richard Vézina
Hello, I can't say for sure, but I don't see why rname wouldn't work with auth_table if you customize them, at least it should work with the old way of customizing as you use define_table to do so and rname is an attribute of it :

[web2py] Insert record with dynamic multiples fields

2017-03-20 Thread dicolla
I'd like to convert this static INSERT command: db_handle.MYTAB.insert(date='1212121', time='99' ) in a dynamic command like this: wFields=[] wFields.append( {'date':'1212121'} ) wFields.append( {'time':'99'} ) db_handle.MYTAB.insert(wFields) but I got an error:

[web2py] Re: We do not delete posts

2017-03-20 Thread 'ross mclean' via web2py-users
I've made 2 post put neither appear to have been published, assuming this is due to me being a new member. If possible please could one of the moderators review and approve. Ross On Monday, July 20, 2015 at 9:08:57 AM UTC+1, Massimo Di Pierro wrote: > > We never delete posts from users, unless

[web2py] SQLFORM() as input to create query for SQLFORM.Grid

2017-03-20 Thread 'ross mclean' via web2py-users
Hi All, newbie in python and stuck on creating a query from a sqlform() suitable to use for querying multiple table and returning in a datagrid. Each drop down is connected to a unique table -> I would like on submit to used the request.vars and pass these in a query to return the data grid

[web2py] Re: problem with ldap authentication

2017-03-20 Thread Santiago Cartasegna
Have you tried to check conectivity between servers without Web2py in the middle? For example, try to do a ldapsearch to see if it works. El martes, 7 de marzo de 2017, 12:32:42 (UTC-3), Carlos Cesar Caballero escribió: > > Hi, I am trying to include ldap authentication to my app, and for

[web2py] RuntimeError: no driver available ('pymongo',) - Windows 8.1

2017-03-20 Thread vymy
Hi All, I am getting the following issue when I am trying to connect web2py with mongoDB. Can someone help what I am missing and how to make the pymongo driver available on my windows 8.1 on which I am running web2py. Sincere Thanks. Error ticket for "images" Ticket ID

[web2py] Retrieve other fields from the LDAP database

2017-03-20 Thread John Freking
I have used LDAP login with MS Active Directory and I added the extra fields for names and emails to the AUTH_USER table. [ldap_auth(mode='ad', manage_user=True, user_firstname_attrib = 'givenName', user_lastname_attrib = 'sn', user_mail_attrib = 'mail', This code works fine but I want to

[web2py] Smartrgrid verify old value on record before update

2017-03-20 Thread Santiago Cartasegna
Hello, I am trying to do some validation before updating a record. My idea is to verify that the new value of a field is bigger than the old one. However I am not getting how to do it: table definition: db.define_table('t_myTable', Field('f_year', type='integer',

[web2py] real name of auth tables

2017-03-20 Thread Kristján Valur Jónsson
I see that database tables now have a "rname" field so it is possible to add schema addressing to them. However, the auth tables don't support it. I propose adding auth.settings.table_user_rname etc. attributes (defaulting to None) so that one can specify the real table name separately from the

[web2py] Re: problem with ldap authentication

2017-03-20 Thread Vincent Borghi
Hi, I do not know if this is your case, but in my case I was apparently obliged to implement this setting: ldap.set_option(ldap.OPT_X_TLS_NEWCTX, 0) in order to work around the problem discussed here:

[web2py] Filter data based on clicked images

2017-03-20 Thread Scorpa
Hello folks! I'm struggling with this idea - page have several images, user can click on it, then controller must be called with selected id of the image as param. in controller i'm doing db.select based on this id. User can click another one adding its id to variables list. So the question

[web2py] Re: 'Column table.id not found (SQLTABLE)'

2017-03-20 Thread Santiago Cartasegna
Are you trying to use a table that you have defined in your database and not in web2py? If it is the case you must add an id field with autoincremental El domingo, 12 de marzo de 2017, 20:27:08 (UTC-3), LoveWeb2py escribió: > > Keep getting this error for all of my tables!! What is going on? >

[web2py] Retrieve other fields from the LDAP database during login

2017-03-20 Thread John Freking
I'm using LDAP AUTH with MS Active Directory and I added three extra fields for names and email. The three fields are. user_firstname_attrib user_lastname_attrib user_mail_attrib This code works fine but I want to retrieve other fields from the LDAP database. Is it possible to get more than

[web2py] UnboundLocalError: local variable 'books' referenced before assignment

2017-03-20 Thread Joe Dunst
I'm trying to make a "vote up" and "vote down" feature in my program, like the one in reddit.com. But I've been receiving tickets from 2 different errors. (I solved the first one but I want to First, I received a "UnboundLocalError: local variable 'books' referenced before assignment" This

[web2py] How to import google-api-python-client in web2py?

2017-03-20 Thread Peter Weicher
Hello, I am trying to use web2py to build an application that requests data from various google APIs. Using my local install of Python 3 or Python 2, I am able to import the necessary modules and query the api. I have tried the following, restarting the webserver between each action: 1)

[web2py] What is the path for the file where I can edit SQLFORM.grid.

2017-03-20 Thread Joe Dunst
I need to put some jQuery on the source file of the SQL.grid so I can have an autocomplete feature in the search bar of tthe grid. If somebody could provide me with the code for this, it will be deeply appreciated. I tried searching the net like Whoosh, web2py apps, stackoverflow, web2py

[web2py] Quick few questions

2017-03-20 Thread paulgxo
Howdy. I have a task with web2py. This is my first experience. My background is in Flask/Django. Here are a few quick questions: 1. I have an image in the a database. The model is defined like this: Field('Image', "upload", requires=[ IS_NOT_EMPTY()], autodelete=True, uploadfolder='uploads/',

[web2py] How to get human readable format string for a many to many join not the Ids in the junction table

2017-03-20 Thread Frek
The field leave_type in the leave_requests table is joined to the leave_allocations table. The drop down in the leave_requests SQLFORM shows only the primary ids in the dropdown. This is not what I need. I need the format strings to be human readable. Here is now the tables are joined.

[web2py] Virtual fields use in an autocomplete widget: error and solution

2017-03-20 Thread Simone Genta
Hi, I'm posting this in the hope it could be useful for someone. I've the need to use a virtual field in an autocomplete widget, to show hierarchy of a reference, something like Field.Virtual('fv_full_name',lambda row,alt=None : row.t_table.f_name if not row.t_table.f_parent else

[web2py] How to add header in soap request using pysimple soap

2017-03-20 Thread Aafak Mohammad
Hi i am using pysimplesoap latest api with python 2.6 just want to add header in my request how i can do that? following is my code i am trying client = SoapClient(wsdl='mcsdk10.wsdl', location="https://10.10.11.164:9443/services/mcsdk10;, trace=True,

[web2py] Unable to start a server

2017-03-20 Thread Rasmus Kreiner
Hi All, I keep getting this error when I try start web2 py: *-* *pi@FoyerAfspiller_1*:*/home/www-data/web2py $* python web2py.py -a 'xxx' -i 192.168.0.10 -p 8000 web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2017 Version

[web2py] Deployment design and CAS

2017-03-20 Thread Pot
Hi all, I am very new to web2py, I am building an accounting system for internal use and a ticketing system for end user. Below are my questions: 1) Should i create 2 web2py applications or 1 application with different controllers to separate the access of accounting and ticketing functions?

[web2py] Re: 'Column table.id not found (SQLTABLE)'

2017-03-20 Thread Peter Weicher
@LoveWeb2py Two questions: 1) Are you running web2py from windows distribution binary or source? 2) can you view ANY other tables besides my_table in that application? I have seen this error too, and my steps to reproduce are below. Still analyzing the root cause. Here is how I reproduced

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-03-20 Thread Jim S
Yes, support became available for Python 2 and Python 3 last summer. Came out in Technology Refreshes. They still have a long way to go getting more packages supported, but base support is there. They also have a local dbapi connector to connect to a DB2/400 database which is what I'm trying

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-03-20 Thread 'DenesL' via web2py-users
Hi Jim Python officially supported on i, finally!! I wish this had happened a while back. It seems that this would require a modified adapter in web2py, sadly I have no access to a current 7.x box to test. Denes On Saturday, March 18, 2017 at 11:11:34 AM UTC-4, Jim S wrote: > > In this example

[web2py] column "worker_stats__tmp" is of type json

2017-03-20 Thread António Ramos
any help? I´m hosting with webfaction and they moved my app to another server column "worker_stats__tmp" is of type json but expression is of type text LINE 1: UPDATE scheduler_worker SET worker_stats__tmp=worker_stats; ^ HINT: You will need to rewrite or cast the expression.Versão web2py™