[web2py] Re: firebird error when tries to execute auth.defines_tables()

2017-10-13 Thread
the reserve keyword in firebird works but when use it with another table relation (reference type) it returns an error *step to reproduce an error* *#create database firebird on ubuntu terminal* isql-fb -user SYSDBA -password password CREATE DATABASE '/testdb.fdb' user 'SYSDBA' password

[web2py] Re: ticket as answer to admin window

2017-10-11 Thread
might we know the error traceback? perhaps some info about your env (os, python version, web2py version, web2py package (source or not), how you start webp2y, etc) about password, think that you can input whatever on it even the simplest like 'a' just 1 character, it accepted (but not

Re: [web2py] Re: web2py and pouchdb

2017-10-09 Thread
yes, you are right, it's javascript/web2py problem, fix it with: *controllers/default.py* def pouchdb(): form = SQLFORM.factory( ... ) if form.process(formname = request.function).accepted: response.flash = 'form accepted' elif form.errors:

[web2py] Re: redis server set up

2017-10-08 Thread
when developing on laptop, installed redis (just 1) on vm (vagrant with linux os) with configuration taken from the book : ref: http://web2py.com/books/default/chapter/29/13/deployment-recipes#Caching-with-Redis http://web2py.com/books/default/chapter/29/13/deployment-recipes#Sessions-in-Redis

[web2py] Re: SQLFORM.smartgrid() custom field representation breaks exporting functions

2017-10-08 Thread
had you already tried to put the copy function in sqlform.grid(links) ? 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 Issues) --- You

[web2py] Re: web2py and pouchdb

2017-10-08 Thread
tested with min app from js on views side, but the result is not expected, the form field name store in indexeddb {{=request.vars.your_name}} as is not the form field value *controllers/default.py* def pouchdb(): form = SQLFORM.factory( Field('your_name', requires = IS_NOT_EMPTY() )

[web2py] Re: how to detect if any view exists

2017-10-05 Thread
*e.g. not tested* import os filename = os.path.join(request.folder, 'views', '%s', '%s.%s') % (request.controller, request.function, 'html') if not os.path.exists(filename): your_code_goes_here best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: represent in sqlform.grid and javascript

2017-10-04 Thread
for 1st problem, tried to print the value of the field just curious what SQLFORM.grid() does with this kind of data with represent, so that it can appears smoothly, while using another it's throw an error, any idea or hints? thanks and best regards, stifan -- Resources: - http://web2py.com

[web2py] Re: represent in sqlform.grid and javascript

2017-10-04 Thread
*modules/test_grid.py* def list(table): query = (table.is_active == True) items = current.db(query).select(orderby = ~table.created_on).render() actions = [ {'is_item_action': lambda item: True, 'url': lambda item: URL('view', args = [item.id] ), 'icon': 'zoom-in', 'title':

[web2py] represent in sqlform.grid and javascript

2017-10-04 Thread
*modules/test_field_constructor.py* represent_reference_0 = lambda value, field: \ A('%s, %s, %s' % (field.address.street, field.address.city, field.address.country), _href="http://maps.google.com/maps?f=q=en=%s,+%s,+%s; % (field.address.street, field.address.city,

[web2py] Re: Upcoming birthdays

2017-10-03 Thread
perhaps you can use python datetime module. e.g. import datetime print (datetime.date.today() + datetime.timedelta(1*365/12)).isoformat() or from datetime import date from dateutil.relativedelta import relativedelta six_months = date.today() + relativedelta(months=+1) The advantage of the

[web2py] Re: Future releases and support

2017-10-02 Thread
trying web2py starter on michael beller github, it's cool is it going to embed in next web2py version? as an alternative scaffolding apps maybe. another things is i think the MENU() and auth.navbar() is implicit that makes hard for developer to modify it, just a suggestion why not make MENU and

[web2py] Re: Mac OSX server startup files

2017-09-28 Thread
just test to create the service for web2py that running from source, status worked (start, stop and restart), pls change the path with your web2py path: e.g. touch ~/Downloads/web2py chmod +x ~/Downloads/web2py vi ~/Downloads/web2py #!/bin/sh . /etc/rc.common StartService( ) { ConsoleMessage

[web2py] Re: Mac OSX server startup files

2017-09-28 Thread
i think the best practice is using web2py source, put it on any directory and create the startup script like shown above. just change the path of /Applications/web2py.app/Contents/MacOS/web2py into any directory you put your web2py folder e.g. source /site/bin/activate # if you plan to put

[web2py] Re: Using SOLR as the web2py backend

2017-09-27 Thread
test it but not work, steps: 1 download, extract and run solr-7.0.0 2 install solrpy easy_install solrpy 3 run and create new web2py app 2.14.6 *models/db.py* import solr s = solr.SolrConnection('http://localhost:8983/solr') *controllers/default.py* def test(): form =

[web2py] Re: couchdb anybody?

2017-09-27 Thread
finally got it work, couchdb 2.1.0 (mac), extract and run apache couchdb.app, pip install couchdb (for python driver) and then running web2py 2.14.6 source (web2py recent version not work error traceback posted above) *error 1:* Traceback (most recent call last): File

Re: [web2py] Re: move database to mongodb

2017-09-26 Thread
thank you all for the input, this topic is open just to put what i tested when using mongodb (just started to learn nosql trying first with mongodb that is supported by web2py), perhaps there are some issue is not resolved like auth permission another error testing found : 1. Didn't support

Re: [web2py] Re: move database to mongodb

2017-09-25 Thread
just want to learn about mongodb and how to use it with web2py, the same code is work in all rdms (tested in sqlite, mysql, postgre except change configuration db uri in appconf.ini and the executesql() create index for text field in mysql (minor) ) but when tested with nosql (first try with

[web2py] Re: Current status of adapting OrientDB for web2py

2017-09-24 Thread
any news of orientdb adapter? 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 Issues) --- You received this message because you are subscribed

[web2py] Re: move database to mongodb

2017-09-24 Thread
*Code:* auth.add_permission(auth_user_id_1, "impersonate", "auth_user", auth_user_id_2) *Error:* ... OverflowError: MongoDB can only handle up to 8-byte ints there was a ticket 2 years ago, but still occured, tested in web2py 2.15.4 *ref:* https://github.com/web2py/pydal/issues/223 best

[web2py] Re: move database to mongodb

2017-09-23 Thread
*Can't retrieve value of reference field (tested in views and in models using represent)* {{=DIV('%s - %s' % (row_person.id_card.id_card_type, row_person.id_card.id_card_number) ) }} *Error:* ... RuntimeError: Using a recursive select but encountered a broken reference: id_card 1 *Solution: *

[web2py] Re: Two forms

2017-09-23 Thread
yes, you are right, my bad, my old code have a race condition because of assigned with max id *e.g.* *have a race condition (don't use it if transaction is high)* id_max = db.order.id.max() maxID = db(db.order).select(id_max).first()[id_max] order_id = int(maxID) + 1 if maxID else 1

[web2py] Re: Cassandra and web2py

2017-09-22 Thread
tryin to use cassandra with web2py using cassandra-driver but return an error: e.g. *cassandra side* pip install cassandra-driver systemctl restart cassandra cqlsh cqlsh> show version [cqlsh 5.0.1 | Cassandra 3.11.0 | CQL spec 3.4.4 | Native protocol v4] cqlsh> CREATE KEYSPACE mykeyspace WITH

[web2py] Re: Two forms

2017-09-22 Thread
face this before, usually created the form with web2py components 1 for items (up first), save the value of items on the sessions then another component for order table (below to submit all the data (data in sessions input to items and order data) during the form.process() or form.validate()

[web2py] move database to mongodb

2017-09-21 Thread
it seems move existing code that use a rdms (sqlite, mysql, postgresql) to mongodb need an extra effort. e.g. *DAL connection from book* >>> db = DAL('mongodb://user:password@localhost/connect_test') *Error:* ... OperationFailure: command SON([('authenticate', 1), ('user', u'user'), ('nonce',

[web2py] Re: couchdb anybody?

2017-09-21 Thread
tested in web2py 2.15.4, ubuntu xenial 64 (vagrant), couchdb install via apt install couchdb, test in http browser (http://127.0.0.1:5984) : {"couchdb":"Welcome","uuid":"xxx","version":"1.6.0","vendor":{"name":"Ubuntu","version":"15.10"}} *private/appconfig.ini* uri =

[web2py] web2py and pouchdb

2017-09-20 Thread
is web2py can work with pouchdb ? any example of DAL pouchdb connection ? thanks and 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 Issues)

[web2py] Re: Basic question about app compile

2017-09-20 Thread
in web2py appadmin after you compile the web app, there is "pack compiled", to download the compiled webapp without the source code, reupload the compiled webapp into new webapp, then you can learn from it which source code is removed from pack compiled. when the web app is compiled (the source

[web2py] Re: the way to return json

2017-09-18 Thread
a, i c, not tested on that yet, will do, btw, forgot to add service.json() not sure about the difference or performance compare with json/simplejson, as_json(), response.json(), restful e.g. @service.json def service_json_call_json_rows(): query = (db.auth_user.id > 0) rows = db(query).select()

[web2py] Re: how to import csv data and use the imported data

2017-09-18 Thread
web2py has dal function for import csv (.import_from_csv_file() ) ref: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Exporting-and-importing-data i think you should define the table that meet your data in the model first, then use dal function

[web2py] Re: the way to return json

2017-09-18 Thread
yes you are right .as_list() will be called automatically when pass it to response.json() rows.as_json() work well too unfortunately it's not documented in book yet: def json_rows_as_json(): query = (db.auth_user.id > 0) rows = db(query).select() return rows.as_json() *not sure about :*

[web2py] the way to return json

2017-09-17 Thread
just testing several code that return json *e.g.* *controllers/api.py* def json_rows_as_list(): import json query = (db.auth_user.id > 0) rows = db(query).select() json_list = json.dumps(rows.as_list(), default = str, sort_keys = True) return dict(results = XML(json_list) ) """ curl -X GET

Re: [web2py] Re: web2py 2.15.4 is OUT

2017-09-14 Thread
*e.g.* *models/db.py* def __before_insert_cash_in(f): chart_of_account = int(f['chart_of_account'] ) # get default value for branch field from coa table field branch query_coa = (db.chart_of_account.id == chart_of_account) row_coa = db(query_coa).select().first() #f['branch'] = '%s' %

Re: [web2py] Re: web2py 2.15.4 is OUT

2017-09-14 Thread
before_insert callback that insert value to table with required = True is still error (temporary solution is set required = False, while in 2.14.6 it works with required = True). best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Access to github book repositoy

2017-09-14 Thread
for step by step example in terminal (after you fork web2py on github) : Change : - path with your own path - githubuser with your github username - fix_memcache_appadmin with your new branch name - the code with your modified one - comment with your title comment 1. Fork repository

[web2py] Re: Email with body from 'response.render'

2017-09-14 Thread
had you tried to use *.html file? e.g. *controllers/default.py* def mail(): table_id = request.args(0) message = response.render('templates/mail/test.html', dict(table_id = table_id) ) *views/templates/mail/test.html* test {{=table_id}} best regards, stifan -- Resources: -

Re: [web2py] Re: web2py 2.15.4 is OUT

2017-09-14 Thread
test SQLFORM.grid() export TSV, return error: Traceback (most recent call last): File "/Users/MacBookPro/site/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File "/home/test/web2py/applications/test/controllers/system.py", line 240, in File

Re: [web2py] Re: web2py 2.15.4 is OUT

2017-09-13 Thread
trying to run 2.15.4 app in 2.14.6 machine return an error : Traceback (most recent call last): File "/home/test/web2py/gluon/main.py", line 445, in wsgibase serve_controller(request, response, session) File "/home/test/web2py/gluon/main.py", line 165, in serve_controller environment =

Re: [web2py] Re: web2py 2.15.4 is OUT

2017-09-12 Thread
just tested that maxtextlengths doesnt have any effects, the long field value still have ... *e.g.* grid = SQLFORM.smartgrid(..., maxtextlengths = {'table_name.field_name' : 350} ) is it correct or should i just used maxtextlength = 350 ? thanks and best regards, stifan -- Resources: -

[web2py] data represent in views is loaded faster using for loop python rather than using response json

2017-09-11 Thread
why the data represent in views is loaded faster using for loop python rather than using response json? is it normal or maybe something wrong with my code? *e.g.* *controllers/api.py* @auth.requires_login() @request.restful() def json_pie_test(): def GET(id): query = (db.product.id

[web2py] Re: Why web2py server hangs/freeze?

2017-09-10 Thread
is put session.forget() at the beginning of the function can make process goes faster? and move the computation to a background task is same like put it on web2py scheduler? thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] How can you remove the text "Export" from a grid??

2017-09-07 Thread
had you tried : csv = False 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 Issues) --- You received this message because you are subscribed to

[web2py] Re: Adding multiple records in single table

2017-09-06 Thread
just an idea, why not create everything into 1 SQLFORM.factory() and then store them into a session, during form.validate(), you can validate the data and insert or update into their own tables best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: how to pass table name to controller?

2017-09-01 Thread
is db.Role.object_super_object_FK.requires = IS_IN_DB(db (db.cost_center.id), 'cost_center.super_object_fk', '%(cost_center_title)s', zero = T('choose one')) really work ? *from the book :* IS_IN_DB(db|set,'table.value_field','%(representing_field)s',zero='choose one') where the third and

[web2py] Re: how to pass table name to controller?

2017-09-01 Thread
had you tried ? e.g. specificTableToSearchMembersFromID = db.cost_center.id 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 Issues) --- You

[web2py] Re: put multiple database tables like grid in one place

2017-08-29 Thread
got it, my bad forget to add .as_list() on the rows thanks and 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 Issues) --- You received this

[web2py] Re: put multiple database tables like grid in one place

2017-08-28 Thread
trying your suggestion with datatables that have web2py multiple table relations join *ref:* http://www.web2pyslices.com/slice/show/2052/using-datatablesnet-with-web2py-for-ultra-fast-grid-display *models/db.py* db.define_table('sale_order', Field('sale_order_no') ) db.define_table('cash_in',

[web2py] Re: Two database join query

2017-08-28 Thread
had you tried ? *e.g. not tested* rows = db(db1.table1.pid == db2.table2.pid).select() ref: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Inner-joins best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: put multiple database tables like grid in one place

2017-08-28 Thread
my current models db.define_table('sale_order', Field('sale_order_no'), Field('sale_order_date', 'date'), Field('customer', 'reference customer'), Field('product', 'reference product'), Field('quantity', 'integer'), Field('price', 'double'), Field('total_price', 'double'), Field('grand_total',

[web2py] Re: web2py 2.15.3 is OUT

2017-08-27 Thread
it seems response.js have a different behaviour in new version e.g. (the same code work well in 2.14.6) ... if form.process().accepted: ... target_response = "jQuery('#test .close').click(); jQuery('#test').get(0).reload()" response.js = target_response

[web2py] Re: auth_user email field

2017-08-26 Thread
had you already tried ? *e.g. not tested* # after auth.define_tables() db.auth_user.email.unique = False or auth_table.email.unique = False if not work perhaps you can custom auth_table ref: http://web2py.com/books/default/chapter/29/09/access-control#Customizing-Auth best regards, stifan --

[web2py] put multiple database tables like grid in one place

2017-08-23 Thread
is there any way to put multiple database tables like grid in one place using web2py way? tried before just using 2 database tables, and use distinct on SQLFORM.grid but theres a lot of redundant/repeated data in the SQLFORM.grid search form field. e.g. database tables sale_order_header (field

[web2py] Re: using before and after update callback simultaneously on the same table

2017-08-18 Thread
thanks leonel for the hints, find the solution with update_naive, because the logic for the real code is to recalculate the order table when it's update e.g. use update_naive def __after_update_order(s, f): if not ('is_active' in f and f['is_active'] == False): s.update_naive(notes = 'test')

[web2py] using before and after update callback simultaneously on the same table

2017-08-18 Thread
is it possible to using before and after update callback simultaneously on the same table? tested before but got an error traceback *e.g.* def __before_update_order(s, f): query = (db.product.id == 1) db(query).update(quantity = 9) def __after_update_order(s, f): if not ('is_active' in f and

Re: [web2py] Re: web2py 2.15.3 is OUT

2017-08-15 Thread
in 2.15.3, sometimes an error occured saying there is no app_name/languages/default.py solution : copy languages/default.py from 2.14.x version question : is the file remove for a purpose ? checked on github, there is no file in welcome/languages/default.py thanks and best regards, stifan --

[web2py] Re: web2py with js framework

2017-08-14 Thread
thanks Carlos for the clear hints 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 Issues) --- You received this message because you are

[web2py] Re: web2py with js framework

2017-08-12 Thread
@ mirek thanks for the pointer, that's what i learned from scaffold app, need to remove the unnecessary thing like whoosh, so that i can focus to learn the logic what job is handle by whom (web2py or js framework), need to learn start from simplest first, hehe @ val just want to learn how can

[web2py] Re: multiple form in 1 page using tab

2017-08-12 Thread
thanks for the hints paolo, test the active tab logic but the result is same without condition (after submit the active tab is back to it's own class) my code above is not working as expected due to javascript i forgot to put in the views side e.g. {{if response.new_window:}}

[web2py] multiple form in 1 page using tab

2017-08-11 Thread
is it possible to have multiple form in 1 page using tab? z tried it before but no luck (no error occured but the result is not expected) the result that should open the new browser tab didnt open, after submit it just return flash 'success' *e.g.* *controllers/default.py* def report(): query =

Re: {Disarmed} [web2py] Re: custom filter in grid

2017-08-11 Thread
just an idea why not create the new field with the date type with default value = request.now? so that user can search through the new date field best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: custom filter in grid

2017-08-10 Thread
in grid search form field you can use : table.table_datetime >= "2017-04-04 00:00:00" and table.table_datetime <= "2017-04-04 24:00:00" table.table_datetime >= "2017-04-04 00:00" and table.table_datetime <= "2017-04-04 24:00" table.table_datetime >= "2017-04-04 00" and table.table_datetime <=

[web2py] Re: Require field length 9 or 13

2017-08-09 Thread
just curious ANY_OF() is it python syntax? search on web2py book not found, check on python not found too is it same like : https://docs.python.org/2/library/functions.html#any ? thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: web2py with js framework

2017-08-08 Thread
thanks for reference anthony, already seen and learned from web2py scaffold (vue + whoosh) but for me, it's complex i want to learn it start from simple first, perhaps there is another simple web2py app with whatever js framework (1 table with 1 field that have CRUD operation or GRID is enough

[web2py] Re: redirect fails with only an error ticket from deep inside the framework

2017-08-08 Thread
seen the error you provide seems that there is no mysql driver python module installed RuntimeError: No driver of supported ones (\'MySQLdb\', \'pymysql\', \'mysqlconnector\') is available\n' perhaps installed mysql python module (using pip or etc) can solve the problem. best regards, stifan

[web2py] web2py with js framework

2017-08-08 Thread
is there any simple web2py app with js framework (whatever) that have a CRUD or GRID example? want to learn to combine it, but confuse, what is web2py job (define models, provide restful api, any others ?), what is js framework job (client side response) ? how about the form handling (web2py or

[web2py] Re: web2py 2.15.3 is OUT

2017-08-08 Thread
Internal error Ticket issued: unknown *error shown in terminal (previous version shown in appadmin errors)* ERROR:web2py:Traceback (most recent call last): File "/Users/MacBookPro/site/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File

[web2py] Re: web2py 2.15.3 is OUT

2017-08-08 Thread
already fixed leonel, the error caused by the sqlite database that already exist and fake_migrate settings (appears in terminal console that run web2py) the different behaviour is in previous version an error will recorded in appadmin errors, while in latest version it appears in terminal

[web2py] Re: web2py 2.15.3 is OUT

2017-08-07 Thread
problems from 2.15.1 still exist 1. Minify problems still exist models/db.py response.optimize_js = 'concat,minify,inline' Access : http://127.0.0.1:8000/test/appadmin/d3_graph_model Return : Traceback (most recent call last): File "/Users/MacBookPro/site/web2py/gluon/restricted.py", line 219,

[web2py] Re: web2py 2.15.3 is OUT

2017-08-07 Thread
test the new version (web2py_src.zip) with the same code that work in previous version (2.15.2) got an error : Internal errorTicket issued: unknown step i took : cd rm -rf ~/web2py/applications/test cp -R ~/web2py/applications/welcome/

[web2py] grid show or hidden table coloumn

2017-08-01 Thread
is it possible to show or hidden table coloumn in grid base on user choosen? thanks and 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 Issues)

[web2py] Re: belongs handle if there is only one value

2017-07-29 Thread
if test0 != None and type(test0) == str: query = (db.test1.test0 == test0) elif test0 != None and type(test0) == list: query = (db.test1.test0.belongs(test0) ) else: query = (db.test1.id > 0) return error traceback when access http://127.0.0.1:8000/a/default/test1?test0=None# *ValueError:

[web2py] Re: belongs handle if there is only one value

2017-07-29 Thread
thx 4 the way out massimo, another way is to use if condition that check the data type *e.g.* if test0 != 'None' and type(test0) == 'str': query = (db.test1.test0 == test0) elif test0 != 'None' and type(test0) == 'list': query = (db.test1.test0.belongs(test0) ) else: query = (db.test1.id > 0)

[web2py] belongs handle if there is only one value

2017-07-28 Thread
is it possible belongs to handle if there is only one value? e.g. *models/db.py* db.define_table('test0', Field('name'), format = '%(name)s') db.define_table('test1', Field('name'), Field('test0', 'reference test0'), format = '%(name)s') *controllers/default.py* def install(): if

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

2017-07-26 Thread
yes, the new tables same for all which is base on detail_coa. the idea is to separate it is base on the case e.g. user input data on chart_of_account table e.g. : -cash -bank a -bank b the same thing goes for account table that automatically create chart_of_account table to maintain the data of

[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: Page with four LOAD components is too slow

2017-07-21 Thread
@leonel, might i know what do you mean with scaling horizontally and scaling vertically? thanks and 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

[web2py] Re: web2py 2.15.2 is OUT

2017-07-20 Thread
yes, you are right, fake_migrate_all=True in db.py fixed the auth_user table exist's problem and the clone problem didn't appear again thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: web2py 2.15.2 is OUT

2017-07-20 Thread
found another error that the same code run well in previous version (different from reported before) Traceback (most recent call last): File "/Users/MacBookPro/site/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File

Re: [web2py] web2py 2.15.2 is OUT

2017-07-19 Thread
found an error that the same code didn't throw an error in previous version 2.15.1 Traceback (most recent call last): File "/Users/MacBookPro/site/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File

[web2py] Re: form validation based on value on another form field

2017-07-13 Thread
yes, thanks for the hints lionel, the show_if works, but the requires part that depend on another form field is still not work. no error occured, but the form validation is not work. i've create another simple webapp too but still got the same (before use is_in_db() that refer to another table,

[web2py] form validation based on value on another form field

2017-07-13 Thread
is it possible to validate form based on value on another form field? *e.g.* *controllers/default.py* def test(): * if request.vars.field0 == 4:* * #if request.post_vars.field0 == 4:* * db.test.field1.requires = IS_IN_DB(db, db.field1.id, db.field1._format)* * else:* * db.test.field1.requires =

[web2py] Re: How to display filtered records in drop down for further selection in SQLFORM?

2017-07-12 Thread
i think you can put query on that e.g. db.person.name.requires = IS_IN_DB(db(db.person.id > 10), 'person.id', '%(name)s') ref: http://web2py.com/books/default/chapter/29/07/forms-and-validators#Database-validators best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Parent - Child (multiple rows / grid) form development

2017-07-11 Thread
in form side, everything in 1 page i usually use web2py load components: first component is an sqlform.factory() to select the invoice_items second component is a view for for invoice_item and third component is sqlform that rever to invoice_header ref:

[web2py] Re: adapt sqlform.factory into form

2017-07-07 Thread
list_show_0 = [('test0', T('Test0') ), ('test1', T('Test1') ) ] form_field_checkbox = lambda list_show, name: \ #DIV(*[DIV(INPUT(_type = 'checkbox', _value = value, _name = name), LABEL(label) ) for value, label in list_show], requires = IS_NOT_EMPTY() )

[web2py] Re: web2py 2.15.0b1

2017-07-06 Thread
the error traceback about routes in application is fixed with *applications/test/routes.py* from *gluon.*fileutils import abspath from *gluon.*languages import read_possible_languages but the same problem is still exist, (no error occured but the result is not expected), what i expect is

[web2py] Re: web2py 2.15.0b1

2017-07-06 Thread
tried routes in applications 1. cp ~/site/web2py/examples/routes.parametric.example.py ~/site/web2py/routes.py 2. cp ~/site/web2py/applications/welcome/routes.example.py ~/site/web2py/applications/welcome/routes.py 3. Start Web2py source ~/site/bin/activate python ~/site/web2py/web2py.py --nogui

[web2py] adapt sqlform.factory into form

2017-07-06 Thread
hi, is it possible to adapt sqlform.factory into form? i've tried before but the result is not expected e.g. *controllers/default.py* account = db(db.account.id > 0).iterselect() list_show = [('chart', T('Chart') ), ('product', T('Product') ) ] *# not work no error occured, but the result is

[web2py] Re: web2py 2.15.0b1

2017-07-06 Thread
Done in pydal issue _before_insert not work when required=True in latest version Done in web2py issue appadmin errors page didn't show detail information admin page, manage button (dropdown) not work (no errors occured) graph model didn't show the erd like in previous version can't use

[web2py] Re: web2py 2.15.0b1

2017-07-06 Thread
just curious how do you shipping the package, for example, i just found there is fabfile.py in the root of web2py folder on github, but not in the web2py_src.zip i want to test fabfile.py too, and must grab it from github, not from the source one thanks and best regards, stifan -- Resources:

[web2py] Re: web2py 2.15.0b1

2017-07-05 Thread
another test 1. can't use response.optimize_js in models/db.py, previous version can work response.optimize_js = 'concat,minify,inline' Traceback (most recent call last): File "/Users/MacBookPro/site/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File "",

[web2py] Re: web2py 2.15.0b1

2017-07-05 Thread
tried to build from scratch with minimal code for test before insert callback problem : *1. create new web2py app* *2. models/db_test.py* def before_insert_test(f): f['field1'] = 'field1' db.define_table('table0', Field('field0', notnull = True, required = True), Field('field1',

[web2py] Re: web2py 2.15.0b1

2017-07-05 Thread
@leonel : - for before_insert callback problem yes, you are right, i intentionally didn't put fund_manager value because i want to test the before_insert callback during insert data on install controller the same code running well in previous version 2.14.6-stable - for admin page manage button

[web2py] Re: web2py 2.15.0b1

2017-07-05 Thread
great jobs massimo and everyone, just found some on the latest version 1. admin page, manage button (dropdown menu) not work (no errors occured) 2. before insert callback (put it on module) is not work in latest version, while the same code and same step is work in 2.14.6-stable Traceback (most

[web2py] auth_cas table

2017-07-01 Thread
just wondering about auth_cas table already tried : http://www.web2pyslices.com/slice/show/1877/single-login-by-two-different-ways the auth_cas table is still empty already tried to disable too (prevent auth_cas table to be created) with auth.settings.cas_domains = None ref :

[web2py] Re: Representing field in IS_IN_DB

2017-06-27 Thread
i think there are two solutions for this 1. either you set the format in every table definition and use the requires IS_IN_DB(query, db.table.id, table._format) 2. you keep your table definition and fixed the requires IS_IN_DB(query, db.table.id, '%s %s' % (id, title) ) ref:

[web2py] Re: datetime or timestamp ?

2017-06-27 Thread
just an idea, i think should define the field as datetime and detect user timezone to represent it, e.g. pytz ref: https://groups.google.com/forum/#!topic/web2py/J5pYfUqrCZY https://github.com/niphlod/w2p_timezone_plugin best regards, stifan -- Resources: - http://web2py.com -

[web2py] Re: we2admin tables

2017-06-21 Thread
i think you can add permission with auth.add_permission() ref: http://web2py.com/books/default/chapter/29/09/access-control best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Newbie question about github / trunk

2017-06-21 Thread
in http://web2py.com/init/default/download you can see there are several links for tester (trunk) e.g. for source code https://mdipierro.pythonanywhere.com/examples/static/nightly/web2py_src.zip best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: Why do I get a blank screen on view

2017-06-15 Thread
just an idea, why not put the default value for that fields? e.g. default = auth.user_id 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: query re grid signature

2017-06-12 Thread
i think it's normal, seems you didn't put user_signature=False during define SQLFORM.grid (the default and recommended user_signature=True) for session_secure(), i think it's not related with user_signature, it's just set the session cookie to be secure cookie and ensure web app using https.

<    1   2   3   4   5   6   7   8   9   10   >