[web2py] best practice for create table base on user insert

2017-07-25 Thread 黄祥
let say i have table that will create a new table base on user input on that table *e.g.* *models/db_schema_1_chart_of_account.py* def __after_insert_chart_of_account(f, id): name = f['name'] table_name = name.replace(' ','_').lower() filename = os.path.join(request.folder, 'models',

[web2py] Re: sqlform.grid maxtextlengths shoots blanks

2017-07-25 Thread Seth J
I have a similar problem with maxtextlengths and I do have the "represent" attribute set like so: Field('f_last_change', type='text', label=T('Latest Changes'), default = '', represent=lambda text, row: HTML(XML(''

[web2py] Re: appadmin

2017-07-25 Thread LC LC
Solved : https://stackoverflow.com/questions/8643664/new-database-refuses-to-show-up-in-web2py-appadmin Le mardi 25 juillet 2017 21:37:47 UTC+2, LC LC a écrit : > > Hi, > > Why can i see tables like auth_user, auth_group, auth_event in appadmin. > the tables exist however .. > Thanks > > --

[web2py] SQLTABLE, columns, and joins

2017-07-25 Thread Dave S
Last night I couldn't figure out to use SQLTABLE's columns param when ROWS I'm trying to display are from an inner join. The ROW objects are composed of dict-like objects for both [or more] tables, i.e., {{segment={id=1234567890, waypoint="Thishereplace",route="thataway", partof= 666}},

[web2py] appadmin

2017-07-25 Thread LC LC
Hi, Why can i see tables like auth_user, auth_group, auth_event in appadmin. the tables exist however .. Thanks -- 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: redirect if registration is pending

2017-07-25 Thread Leonel Câmara
Nope, that option doesn't exist yet. You can go around this by using auth.settings.login_onvalidation and putting a function there that checks for that, sets an appropriate session.flash with auth.messages.registration_pending, and redirects. You can also submit an issue in github and

[web2py] redirect if registration is pending

2017-07-25 Thread Mark Billion
Dumb question and Im sure that there is an answer that Im missing, but when in doubt App requires registration to be approved and if its not, it redirects to the home screen and flashes the standard message. If I want to redirect a login where the user is pending approval to a different

Re: [web2py] Re: wrapping long text lengths in grid/smartgrid

2017-07-25 Thread Anthony
On Monday, July 24, 2017 at 2:04:19 AM UTC-4, rāma wrote: > > Still no solution? > The grid now includes a element with elements like the following: So, you can use CSS rules to control the width of columns based on field names or column numbers. Anthony -- Resources: -

[web2py] Re: After update can't connect Oracle

2017-07-25 Thread Вячеслав Анатольевич
Hi, another error in oracle (can't create auth_ tables): not all arguments converted during string formatting File "D:\Web\server\web2py\gluon\packages\dal\pydal\adapters\oracle.py", line 70, in create_sequence_and_triggers 'MINVALUE -1;' % sequence_name) TypeError: not all arguments

[web2py] Re: grid for data entry

2017-07-25 Thread Nico de Groot
Looks like you specify the left relation also in the select clause. Debugging tip: you can use _select() to see the SQL generated by the DAL. To get answers in the forum, it helps if you convert your question to an minimal example using easy to grasp tablenames and relations. Nico de Groot