[web2py] Install wkhtmltopdf in pythonanywhere

2015-12-01 Thread Alessio Varalta
Hi, I use pythonanywhere and have an application on it. This application use wkhtmltopdf, but how can I install wkhtmltopdf. on pythonanywhere You can't use the console because you don't have sudo privilege. I can see that if you go to Files section(pythonanywhere) you can upload folder or file

[web2py] Migration from console

2015-12-01 Thread Ivan Gazzola
Is it possible to apply migration from console without changing migrate=False in dal connection? How can I do it? Thx Ivan -- 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] disabling date selection from widget

2015-12-01 Thread Manuele Pesenti
Hi! I'd like to disable selection of date outside a defined preriod redefining the calendar widget for my datetime form field... I've tryied this way without success: 1. defining the datetime field with a string widget: Field("checkin", "datetime", label=T("Check-in date"), d

Re: [web2py] Migration from console

2015-12-01 Thread Manuele Pesenti
Il 01/12/15 10:41, Ivan Gazzola ha scritto: > Is it possible to apply migration from console without changing > migrate=False in dal connection? > How can I do it? I would try running a script that load the application environment in which the migrate variable is set to True before it is used in th

[web2py] Re: Future of web2py

2015-12-01 Thread Márcio Almeida
Massimo, thank you very much. I actually had this vision, just like a comment from those involved in the development of framewrok. I feel more secure now at work, and I can pass the information to other friends. Every day more like web2py, who knows when you have more knowledge can contribute to

[web2py] Re: Install wkhtmltopdf in pythonanywhere

2015-12-01 Thread Niphlod
this is much more a question for pythonanywhere techs than web2py users . isn't it ? On Tuesday, December 1, 2015 at 10:24:08 AM UTC+1, Alessio Varalta wrote: > > Hi, I use pythonanywhere and have an application on it. This application > use wkhtmltopdf, but how can I install wkhtmltopdf. o

[web2py] Re: how to stop asynchronous process in python called with ajax ?

2015-12-01 Thread Leonel Câmara
You need to give us more details. But obviously the long running task needs some way to communicate so it knows it's time to stop. A possibility is to have it periodically check a variable in the database to see if it has been aborted. -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Migration from console

2015-12-01 Thread Anthony
In the shell, you can do: db._migrate = True and if necessary: db._migrate_enabled = True Then migrations should work (note, you don't need to call db.commit(), as create/alter/drop table commands are executed immediately without requiring a commit). Anthony On Tuesday, December 1, 2015 at

[web2py] Re: auth.requires_login

2015-12-01 Thread Anthony
Without seeing the traceback, I'm not sure what's causing that, but I see at least two problems... query = db(db.company.created_by.belongs(group_members)) > > The grid takes a Query, but the above is a Set object -- don't wrap the query in db(). > grid = SQLFORM.grid(query, orderby=~

Re: [web2py] Re: How to make a simpleLDAPObject accessible in an app ?

2015-12-01 Thread Jonathan R
Hey Richard, Sorry for the very late answer I had personal issues that kept me out of this project. Yes I try to create an app to "manage" parts of an ldap server such as display query results (predefined queries) and later, maybe, modify informations in this ldap server. On Wednesday, Nove

[web2py] Re: Determine which login method was successful.

2015-12-01 Thread Jonathan R
I'm not sure I was clear enough since there is no answer :p I have 2 ldap server (A and B) and my web app is using both as authentication entity the login_method list in auth.settings is the following : auth.settings.login_methods=[ auth_ldap(server one,options 1), auth_ldap(server two, options 2)

Re: [web2py] Re: How to make a simpleLDAPObject accessible in an app ?

2015-12-01 Thread Richard Vézina
So that is different... So I guess Simone miss understand your goal... I think he may had thought you want to tamper with LDAP... You need the administrator credentials then you can start doing something... And you should have a look to this project : https://pypi.python.org/pypi/ldap3 Python LDA

Re: [web2py] Re: web2py and python3

2015-12-01 Thread Richard Vézina
Another think about the problem and not sure if it relevent though... Let says that what make web2py not support python 3 is SQLFORM or other highlevel... We may leave them behind and write new tools which will be compatible with python 2 and 3... And we can prevent user that if they plan to use w

Re: [web2py] Re: web2py and python3

2015-12-01 Thread Michele Comitini
;-) By now we can plan jump to python4 and skip the (arguably useful) python3 era entirely ;-) 2015-12-01 17:55 GMT+01:00 Richard Vézina : > Another think about the problem and not sure if it relevent though... > > Let says that what make web2py not support python 3 is SQLFORM or other > highlevel

Re: [web2py] Re: web2py and python3

2015-12-01 Thread Richard Vézina
That is another option! :) Richard On Tue, Dec 1, 2015 at 1:20 PM, Michele Comitini wrote: > ;-) By now we can plan jump to python4 and skip the (arguably useful) > python3 era entirely ;-) > > 2015-12-01 17:55 GMT+01:00 Richard Vézina : > > Another think about the problem and not sure if it r

[web2py] Re: record versioning

2015-12-01 Thread Anthony
web2py does not support the SQL UNION statement, but you can separately query the two tables and generate the union of the two Rows objects via Python: all_records = db(db.mytable).select() | db(db.mytable_archive).select() See http://web2py.com/books/default/chapter/29/06/the-database-abstrac

[web2py] Re: how to make links conditional in grid

2015-12-01 Thread Alex Glaros
it didn't work Stifan. The links appear regardless If setting is_active == False or True Perhaps the only way to use a represents clause and not use links -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.

[web2py] Re: form validation using onvalidation and form.validate for boolean data type

2015-12-01 Thread Anthony
After form processing, the value of a boolean is either True or False, not "on" or None. If you want a message that works in onvalidation as well as after processing, you can do: if form.vars.is_booking: Anthony On Monday, November 30, 2015 at 8:33:31 PM UTC-5, 黄祥 wrote: > > the error trac

[web2py] Re: how to make links conditional in grid

2015-12-01 Thread Anthony
On Monday, November 30, 2015 at 8:26:01 PM UTC-5, 黄祥 wrote: > > please try : > if db.auth_membership.is_active == True: > links = [...] > else: > links = None > He wants conditional links for each row -- the above code either generates all the links or no links. Anthony -- Resources: - http://

[web2py] Re: how to make links conditional in grid

2015-12-01 Thread Anthony
On Monday, November 30, 2015 at 8:19:09 PM UTC-5, Alex Glaros wrote: > > what is syntax for making links conditional in grid? > > I only want links to appear if db.auth_membership.is_active == True > > links = [dict(header='Cancel connection', body=lambda row: A('Withdraw my > invitation', _href=

Re: [web2py] Re: record versioning

2015-12-01 Thread Fabiano Almeida
thanks! 2015-12-01 17:21 GMT-02:00 Anthony : > web2py does not support the SQL UNION statement, but you can separately > query the two tables and generate the union of the two Rows objects via > Python: > > all_records = db(db.mytable).select() | db(db.mytable_archive).select() > > See > http://w

[web2py] Re: how to make links conditional in grid

2015-12-01 Thread Alex Glaros
works, thanks Stifan and Anthony! -- 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 Group

Re: [web2py] How to use fancytree?

2015-12-01 Thread Henk huisman
Thanks for your suggestion, Johann. I tried it, but doesn't seem to make much difference. If I look at the source code in my browser, all the links to css and js files seem to work well... Tried to put the javascript and css in layout.html.. no results either. What do I see over the head? Hen

[web2py] Re: form validation using onvalidation and form.validate for boolean data type

2015-12-01 Thread 黄祥
it works, thank you so much for detail explaination, anthony. another thing, i encountered it with another field in table that use show_if condition, and then check that field value e.g. in models db.checking_in.booking_no.show_if = (table.is_booking == True) in controllers if form.vars.booking_

[web2py] Re: how to make links conditional in grid

2015-12-01 Thread 黄祥
sorry, my bad, thank you so much for the correction, anthony best regards, stifan On Wednesday, December 2, 2015 at 2:32:10 AM UTC+7, Anthony wrote: > > On Monday, November 30, 2015 at 8:19:09 PM UTC-5, Alex Glaros wrote: >> >> what is syntax for making links conditional in grid? >> >> I only wan

[web2py] Seeing SQL Create Statements

2015-12-01 Thread Rob N
Hi all, I'm looking for a way to be able to see all the SQL create statements the DAL used to generate the database for my app. I was thinking I could use _lastsql but I'd really rather not delete the whole database to get it to run those queries again. My apologies if I've overlooked somethin

[web2py] Re: Seeing SQL Create Statements

2015-12-01 Thread 黄祥
there is sql.log file in databases folder of your applications, or you can simply looking in the appadmin as well (near models) best regards, stifan On Wednesday, December 2, 2015 at 6:37:12 AM UTC+7, Rob N wrote: > > Hi all, > > I'm looking for a way to be able to see all the SQL create stateme

[web2py] Re: Future of web2py

2015-12-01 Thread Ramkrishan Bhatt
HI Márcio Almeida, * As per my opinion i can say Yes as per below points:-* *1. Great Support from developer groups:-* I felt never stuck in Web2py as i always got my solution quickly, even Massimo him self will reply surly. Many times i felt shy to ask small question but that als