[web2py] Re: Force authentication to whole app

2015-02-13 Thread mcamel
Cool!. It works perfectlly on controllers files, but causes infinite recursion in auth model file. So if you want to apply it to your whole app, writing it once and in one place, this can be used in auth model, after defining auth: if request.url != auth.settings.login_url: auth.requires_l

[web2py] Re: can we have web2py groups with AD authentication ?

2015-02-13 Thread mcamel
Maybe you can delegate auth to Ldap and use auth.settings.login_onaccept.append(lambda form: my_postlogin_tasks(form. vars.username..)) to set a session variable that enables or disables admin access depending on who the user is. Then you could use auth decorators like @auth.requires(sessi

Re: [web2py] Re: Best and simpler approach to Inline editing / deleting / appending (jqGrid, Jeditable,etc)

2015-02-13 Thread Clara Ferrando
Hello, Thanks all for the support and suggestions. I was able to get the slice using Jqgrid working ( http://www.web2pyslices.com/slice/show/1714/jqgrid-viewing-and-updating-data). But I will take a look at the Massimo and Michael suggestions. Thanks again, Clara On Feb 11, 2015 1:25 PM, "Mass

[web2py] Re: can we have web2py groups with AD authentication ?

2015-02-13 Thread Niphlod
imho the docstrings are pretty clear manage_groups=True --> turns on the whole machinery to sync ldap groups with web2py's ones at login time with manage_groups=False, your users basically don't need to register theirself and web2py doesn't need to store the password, but you can still

[web2py] Re: Expose class into a component

2015-02-13 Thread Anthony
If you specify the name of the target div for the component (e.g., LOAD(..., target='expose')), the JS would be something like this: jQuery('#expose a').click(function(e) { e.preventDefault(); $.web2py.component(this.href, 'expose'); }); Anthony On Friday, February 13, 2015 at 2:25:49 A

[web2py] Re: Force authentication to whole app

2015-02-13 Thread JorgeH
This should really go in documentation ;) On Friday, February 13, 2015 at 5:19:33 AM UTC-5, mcamel wrote: > > Cool!. > > It works perfectlly on controllers files, but causes infinite recursion in > auth model file. > > So if you want to apply it to your whole app, writing it once and in one > pl

[web2py] web2py + celery + pydal

2015-02-13 Thread Tito Garrido
Hi Folks! I am working on a project that will require some celery tasks and I would like to use pydal to manage the tables created on web2py. So an example, a simple tw clone... that would use auth_user table + references db.define_table('tweet', Field('user_id', 'reference auth_user'),

[web2py] Re: web2py + celery + pydal

2015-02-13 Thread Tito Garrido
I just found "auto_import" that is great! db = DAL('mysql://user:pass@localhost /datab',folder='path_to/applications/myapp/databases',auto_import=True) Works great! On Fri, Feb 13, 2015 at 3:24 PM, Tito Garrido wrote: > Hi Folks! > > I am working on a project that will require some celery ta

[web2py] Options selected in form

2015-02-13 Thread José Eloy
Hi there! I'm facing troubles with my application. I need to create a dynamic set of options (SELECT-OPTION) from a database table. When the user push the submit button of a form I need to know what options were selected. I Would like to know this from the controller, not from javascript Part

Re: [web2py] Options selected in form

2015-02-13 Thread Richard Vézina
easy : form.vars.your_select_field_name What do you need exactly, you didn't tell us... Your example is difficult to understand (tldr) As I wrote if you want to know what was the input select value once form is submitted it can't be more easy... My guess though, is that you want to create a kind

[web2py] queries from SQLFORM.grid and smart grid with related views

2015-02-13 Thread Simon Marshall
Hi All, I'm trying to create a management interface for the following tables, but i cannot get it to work the way i want. i'm trying to manage the auth_user table and another table containing a reference to auth_user. but i cannot get them to show as i'm unsure the best way to construct the qu

[web2py] Re: Infinite redirect when using ajax callback and a site parameter

2015-02-13 Thread Christian
Thanks a lot, Leonel! With the correct URL it works. -- 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] Difference in TEXT field presentation between View and Edit modes

2015-02-13 Thread Gary Cowell
I have a SQLFORM.grid containing : grid = SQLFORM.grid( query=queryInstalled, fields=[db.e5systemstatus.id, db.e5systemstatus.patch, db.e5systemstatus.patchstatus, db.e

[web2py] howto processing dynamic forms when update

2015-02-13 Thread Erwn Ltmann
hi everybody, been starting with web2py weeks ago and now my first unsolved issue appears. There is an action to handle a custom form (as skeleton code here): form = FORM() for row in some_data_source: if row in relevant_data_source: form.append( INPUT(...var...) ) if form.accepts(...):

[web2py] DAL database adapter only validates datetime on read.

2015-02-13 Thread MDSIII
I'm inserting a row with a value for a datetime type field such as '2015-02-12T14:43:52.113000'. The DAL lets me do the insert but errors in the adapter when I do a select that includes this row/column. I realize the string does not match the datetime.isoformat(' ') that the dbapi adapter expe

[web2py] Re: can we have web2py groups with AD authentication ?

2015-02-13 Thread Gary Cowell
Thanks. I've just been given access to an LDAP server, so I'll be able to try things. If I get something working, I'll post it. On Friday, 13 February 2015 10:41:13 UTC, mcamel wrote: > > Maybe you can delegate auth to Ldap and use > auth.settings.login_onaccept.append(lambda form: my_postlogin_

[web2py] Example application demonstrating standard web2py login & multiple social logins without janrain?

2015-02-13 Thread Spokes
Does anyone have a minimal example application demonstrating how to give the user the option of logging in with either social platforms (at least Twitter and Facebook) without using janrain, or with the standard web2py/login? I've gotten as far as implementing Twitter and FB classes in accorda

Re: [web2py] Re: Best and simpler approach to Inline editing / deleting / appending (jqGrid, Jeditable,etc)

2015-02-13 Thread Tim Richardson
there is this approach as well, which makes the existing SQLGRID.grid widget editable. http://www.web2pyslices.com/slice/show/1928/basic-inline-editing-in-sqlformgrid-no-plugin-no-javascript On Friday, 13 February 2015 22:36:48 UTC+11, clara wrote: > > Hello, > > Thanks all for the support and

[web2py] Re: queries from SQLFORM.grid and smart grid with related views

2015-02-13 Thread Niphlod
the grid doesn't allow to edit in a single form fields coming from different tables, so there's no way to accomplish what you need with the standard SQLFORM.grid. On Friday, February 13, 2015 at 3:34:50 PM UTC+1, Simon Marshall wrote: > > Hi All, > > I'm trying to create a management interface f

[web2py] Re: howto processing dynamic forms when update

2015-02-13 Thread Niphlod
that doesn't really make sense """ i have to call twice this action because first relevant_data_source will be updated in accepts block """ What you're stating is - actually - that you need two separate logics (and forms): in order to create - and validate - the second, you need the user t

[web2py] Re: Difference in TEXT field presentation between View and Edit modes

2015-02-13 Thread Niphlod
HTML doesn't preserve line breaks by default: that's why there are or tags you need a "custom" represent function to fill the cell of the grid with *thetext* instead of simply *thetext .*Use something like db.e5systemstatus.patchlog.represent = lambda value, row : PRE(value) and it sh

[web2py] Re: uwsgi: strange messages

2015-02-13 Thread cem
I used the same script to setup nginx and uwsgi and it helped me a lot speeding up my learning process, as it is almost turnkey. I had the same warning message for uid though it has been clearly configured in web2py.ini. I just added --uid param to the exec command and did not further investiga

[web2py] Re: Difference in TEXT field presentation between View and Edit modes

2015-02-13 Thread Gary Cowell
Many thanks, that worked great. Looks good too in the way it formats it. On Friday, 13 February 2015 19:54:15 UTC, Niphlod wrote: > > HTML doesn't preserve line breaks by default: that's why there are > or tags > > you need a "custom" represent function to fill the cell of the grid with >

[web2py] Re: web2py session error: ('NoneType' object is not callable)

2015-02-13 Thread Massimo Di Pierro
Did you delete your existing sessions? On Wednesday, 11 February 2015 10:12:18 UTC-6, Jason Lee wrote: > > I am storing the session data in a database. > > I am using the latest web2py. > > I have deleted everything, reinstalled fresh, deleted the database and > rebuilt it and I still get this er

[web2py] Re: How can I retain form data across a web2py_component() refresh?

2015-02-13 Thread Alex Glaros
I have the same issue can you please post sample of javascript to get me going in the right direction? thanks Alex Glaros -- 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] web2py wikia

2015-02-13 Thread Manuel Moscariello
Hello everyone, I have a little question for you all. I started to learn web2py around a month ago and, even though I found in it a great potential and a nice code, I had some issues with the documentation. All the tutorials around are broken links, lacking of explanation and sometimes full of

[web2py] Re: web2py wikia

2015-02-13 Thread Massimo Di Pierro
I promise I will do a thorough review of the book asap and will publish a 6th edition. As far as the wiki goes we have web2pyslices but it needs to evolve Any volunteers? Massimo On Friday, 13 February 2015 19:48:16 UTC-6, Manuel Moscariello wrote: > > Hello everyone, > > I have a little q

[web2py] please help test binaries

2015-02-13 Thread Massimo Di Pierro
Can you please help us test the binaries? http://www.web2py.com/examples/static/nightly/web2py_win.zip http://www.web2py.com/examples/static/nightly/web2py_osx.zip Massimo -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)