[web2py] Re: Dumb Question - from a real beginner

2015-04-09 Thread JorgeH
glad to see people using web2py for raspberry projects ;) maybe future features of web2py could focus a bit more on that niche On Thursday, April 9, 2015 at 8:32:21 AM UTC-5, DXX wrote: So im just starting with Python / Web2py i want to do a simple test page to have a button to turn on

[web2py] Re: [Request] LDAP/FreeIpa Schema support

2015-04-09 Thread Derek
If you can make your addition more generic, then you can issue a pull request from Github. On Thursday, April 9, 2015 at 6:32:21 AM UTC-7, Vicente Carro wrote: Hi, We had a hard time configuring web2py to authorise using our LDAP/FreeIPa schema. More precisely getting the groups of the

[web2py] Re: Thread safety and importing db, response, session

2015-04-09 Thread Anthony
Sure, that's how Auth and Crud work. 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

[web2py] Re: How to implement Gmail Authentication

2015-04-09 Thread piero crisci
First of all you need to get the *google_auth.json file to use OAuth* To get that you need to register your Google account as a webdeveloper You can find how get the information on Google :) Then u can change ur auth table in this way In the model.py from gluon.tools import Auth, Crud,

[web2py] Need help with web2pyslices plugin administration

2015-04-09 Thread Mirek Zvolský
I have added plugin_MANAGE_GROUPS to web2pyslices, but the download link is broken. Proper one is zvolsky.github.io/plugin_manage_groups/web2py.plugin.manage_groups.w2p I see the plugin in web2py admin application, Download plugins from repository, i.e. at the url

Re: [web2py] Re: Dumb Question - from a real beginner

2015-04-09 Thread Richard Vézina
Yes, I use button back in time, but with bootstrap I usually do A(I(_class='icon-something', CAT(' '), T('some text'), _href=URL('btnon'), _class='btn btn-small') Now you have an A with the look of a button. Richard On Thu, Apr 9, 2015 at 12:45 PM, Derek sp1d...@gmail.com wrote: Richard's

Re: [web2py] Dumb Question - from a real beginner

2015-04-09 Thread Richard Vézina
In default/index.html view try something like this : button onclick=ajax('btnon',[],null); {{=T('Name of your button')}} /button Richard On Wed, Apr 8, 2015 at 8:39 PM, DXX dxxpub...@gmail.com wrote: So im just starting with Python / Web2py i want to do a simple test page to have a

[web2py] Re: web2py 2.10.3 si OUT

2015-04-09 Thread Niphlod
did you take AT LEAST time to inspect why it's failing ? On Thursday, April 9, 2015 at 6:37:19 AM UTC+2, 黄祥 wrote: functional test is not work in newest version, in old version work. *error* C:\web2py\applications\test\modulespython funcional_test.py No handlers could be found for logger

Re: [web2py] request table name

2015-04-09 Thread 黄祥
thank you so much anthony. it seems need _before_delete callback, with some condition (auth.signature disable or create custom auth.signature). ref: https://groups.google.com/forum/#!searchin/web2py/_before_delete$20callback$20/web2py/didLpxEKT38/mRzmEgHCQeEJ best regards, stifan --

Re: [web2py] Re: Thread safety and importing db, response, session

2015-04-09 Thread Mark Graves
Thanks Anthony, Sorry, I was a bit delirious writing that =) -Mark On Thu, Apr 9, 2015 at 6:47 AM, Anthony abasta...@gmail.com wrote: Sure, that's how Auth and Crud work. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: How to implement Gmail Authentication

2015-04-09 Thread Moiz Nagpurwala
Thanks a lot. I will surely give it a try. -- 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

[web2py] Re: Dumb Question - from a real beginner

2015-04-09 Thread Ron Chatterjee
Derek, I didn't understand what you meant by 'a' link to /btnon it will also call your function? Do you mean, if I click on that button it executes a python function for example and redirect the page or display someone in index.html (where the button is displayed)? What will be the syntax for

Re: [web2py] Re: Triggering a one-time migration when schema changes

2015-04-09 Thread Niphlod
another caveat circumvented, another step in the good direction now the problem is only IF you have conditional models. On Thursday, April 9, 2015 at 10:01:17 AM UTC+2, Pablo Angulo wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 El 08/04/15 a las 20:58, Niphlod escribió:

Re: [web2py] Need help with web2pyslices plugin administration

2015-04-09 Thread Carlos Cesar Caballero Díaz
Same problem here, I can´t publish my plugins in web2pyslices, some months ago I post the problem, but I don´t get any answer. El 09/04/15 a las 08:00, Mirek Zvolský escribió: I have added plugin_MANAGE_GROUPS to web2pyslices, but the download link is broken. Proper one is

[web2py] Update a session variable from a module

2015-04-09 Thread Jordan Ladora
I've got some code (currently in a file in models) where default session settings are set from a db record- def init_settings(db_record): session.timezone = db_record.timezone etc. The problem is that I want to move this code into a module for production, but don't know how to update

[web2py] Re: Dumb Question - from a real beginner

2015-04-09 Thread Derek
Richard's answer should work, but I just wanted to add, if you put an 'a' link to /btnon it will also call your function. On Thursday, April 9, 2015 at 6:32:21 AM UTC-7, DXX wrote: So im just starting with Python / Web2py i want to do a simple test page to have a button to turn on a led

Re: [web2py] request table name

2015-04-09 Thread Anthony
The _before_delete callback should work with auth.signature and record versioning. Note, however, that with record versioning, a special _before_delete callback is added that does an update with is_active=False. So, in addition to adding your own _before_delete callback, your _before_update

Re: [web2py] Need help with web2pyslices plugin administration

2015-04-09 Thread Niphlod
uhm. usually I just: - login to web2pyslices - click on wrote n slices button (redirects to something like http://www.web2pyslices.com/slice/list?author=*some_integer*) - click on my slice title (redirects to something like http://www.web2pyslices.com/slice/show/*an_integer/title_slug*) - click

[web2py] Re: web2py 2.10.3 si OUT

2015-04-09 Thread 黄祥
1. create new test app 2. print the value, as you can see the print syntax. 3. for client.text it return a html, i copas it to the new editor and save it as html file, and search 'Homer' using web browser, the result is it's not found. 4. checked on auth_user table, the homer user is there (can

[web2py] Re: model file not behaving correctly

2015-04-09 Thread 黄祥
i think it related with your db configuration. e.g. db = DAL(myconf.take('db.uri'), pool_size = myconf.take('db.pool_size', cast = int), check_reserved = ['all'], migrate = True, fake_migrate_all = False, lazy_tables = True) best regards, stifan -- Resources: - http://web2py.com -

[web2py] Re: Dumb Question - from a real beginner

2015-04-09 Thread Ron Chatterjee
On Thursday, April 9, 2015 at 2:47:12 PM UTC-4, Ron Chatterjee wrote: Derek, I didn't understand what you meant by 'a' link to /btnon it will also call your function? Do you mean, if I click on that button it executes a python function for example and redirect the page or display the

[web2py] Log db operation to file

2015-04-09 Thread Angelo Compagnucci
Hello List, I'm debugging an application not written by me running in production. I'm looking for a way to log all db operations to file for a certain controller. I'm not looking for a global logging of all operations, but only on controllers of interest. Is there such a nice feature in web2py?

Re: [web2py] Re: Dumb Question - from a real beginner

2015-04-09 Thread Richard Vézina
ajax was because in my case I only block/unblock access by updating registry_id in auth_user... So I wouldn't leave the page and no further page update were required... If you click on an A link of course you will be redirected, except if you set ajax stuff with onclick... You can also not

Re: [web2py] Re: Triggering a one-time migration when schema changes

2015-04-09 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 El 08/04/15 a las 20:58, Niphlod escribió: good too, but NEEDS to happen without lazy_tables ^_^ This is what I do: db = DAL('mysql://web2pyuser:pass@localhost/database', migrate=migrate, lazy_tables=(not migrate)) -BEGIN PGP SIGNATURE-

[web2py] Re: web2py 2.10.3 si OUT

2015-04-09 Thread 黄祥
the error is in webclient, i use https, while test using http://127.0.0.1:8000 is work. perhaps, i lack in the webclient parameters to have it support https. best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: web2py 2.10.3 si OUT

2015-04-09 Thread Niphlod
Why do you even care copy/pasting around snippets? you're registering *ho...* instead of a valid email address! READ the code, UNDERSTAND what the test does, and act accordingly, BEFORE calling it a bug. On Thursday, April 9, 2015 at 8:25:36 AM UTC+2, 黄祥 wrote: 1. create new test app 2.

[web2py] Dumb Question - from a real beginner

2015-04-09 Thread DXX
So im just starting with Python / Web2py i want to do a simple test page to have a button to turn on a led on a RPi... the default.py looks like this import RPi.GPIO as GPIO def index(): return dict(message=this is a test) def btnon(): GPIO.setmode(GPIO.BCM) GPIO.setup(22,

[web2py] [Request] LDAP/FreeIpa Schema support

2015-04-09 Thread Vicente Carro
Hi, We had a hard time configuring web2py to authorise using our LDAP/FreeIPa schema. More precisely getting the groups of the user. At the end we had to do a few changes directly in ldap_auth.py, that's not ideal but at least it's working. Could be possible for you to add one mode in LDAP

[web2py] Set Content-Type for Uploadfs S3FS

2015-04-09 Thread James McGlynn
Hello, I am using fs.s3fs to upload image files directly to s3. It works great, but users can't visit the image link and view directly in their browser, because the content-type is defaulting to application/octet-stream. From my recent searching, I found that fs.s3fs does not support setting

[web2py] Re: Possible bug report - unicode strings in list:string field generating encode errors

2015-04-09 Thread Tom Stratton
In the interest of making info available - I submitted a patch but it hasn't been picked up due to a couple of concerns about future revisions On the off chance that you need to fix this issue and can't wait for the future here is what I have changed - it has been working for me very well. BUT

[web2py] model file not behaving correctly

2015-04-09 Thread James O' Driscoll
I have been building an application with the model in a sqlite db. I received an error stating that the .table file was corrupted, while trying to resolve one .table file, revealed that all were corrupted. This forced me to backup all tables in the db, delete the db and started with a empty db