Re: [web2py] LDAP authentication and user creation

2016-08-24 Thread Marvi Benedet
Ok. Thanks! Good to know that doesn't exist something ready. Will try to find the time to study LDAP and the rest! Bye, Marvi 2016-08-23 15:58 GMT+02:00 Richard Vézina : > For checking if user exist in LDAP you will need to write your own logic > and query LDAP... For creating the user you ha

[web2py] Re: Retrieve custom form input/select value in case of errors

2016-08-24 Thread Mirek Zvolský
form.vars.book_title ? (book, chapter 7) Dne úterý 23. srpna 2016 13:47:34 UTC+2 Gael Princivalle napsal(a): > > Hello. > > In a custom form when the user submit the form with errors I need to > reload all user inputs and set the input value. > > For example here is an input: > {{=INPUT(_type=

[web2py] Retrieving record id after form.process().accepted

2016-08-24 Thread Gael Princivalle
Hello. How can I retrieve the record id when the form is accepted? I would like to use it for redirection. if form.process().accepted: redirect(URL('default', 'book', vars=dict(book_id=???))) Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github

[web2py] Re: Retrieve custom form input/select value in case of errors

2016-08-24 Thread Gael Princivalle
Thank you Mirek for that. Like that it works: {{=INPUT(_type='text', _name='book_title', _id='book_title', _value='form.vars.book_title')}} But web2py don't load the default value set in the table (even before it was like that but I've add it with _value. For having a complete solution I must d

[web2py] Re: Retrieving record id after form.process().accepted

2016-08-24 Thread Anthony
form.vars.id On Wednesday, August 24, 2016 at 12:47:53 PM UTC-4, Gael Princivalle wrote: > > Hello. > > How can I retrieve the record id when the form is accepted? I would like > to use it for redirection. > if form.process().accepted: > redirect(URL('default', 'book', vars=dict(book_id=???))

[web2py] How to enclose items within a link?

2016-08-24 Thread Alex Glaros
How to use web2py redirects to enclose an item? For example I want this effect: but instead of I want to use web2py redirect {{=A like this below {{=A('', _href=URL('default','documentation'))}} {{}} thanks Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (

[web2py] Re: How to enclose items within a link?

2016-08-24 Thread Alex Glaros
I just tried this and solves my immediate problem, but am still curious if can enclose items with w2p link. {{=A(T(''), _href=URL('default','documentation_relationship_type'), _style="color:green; font-size:200%;margin:10px 0px 10px 0px; float:right;padding:10px", _class="glyphicon glyphicon-qu

Re: [web2py] Re: How to enclose items within a link?

2016-08-24 Thread Richard Vézina
**{'other_attribute_name': 'other_attribute_value', ...}, after the last named attribute Richard On Wed, Aug 24, 2016 at 3:17 PM, Alex Glaros wrote: > I just tried this and solves my immediate problem, but am still curious if > can enclose items with w2p link. > > {{=A(T(''), _href=URL('default

[web2py] Re: How to enclose items within a link?

2016-08-24 Thread Ron Chatterjee
On Wednesday, August 24, 2016 at 3:01:57 PM UTC-4, Alex Glaros wrote: > > How to use web2py redirects to enclose an item? > > For example I want this effect: > > > > > > but instead of I want to use web2py redirect {{=A like this below > > {{=A('', _href=URL('default','documentation'))

Re: [web2py] Re: How to enclose items within a link?

2016-08-24 Thread Alex Glaros
thanks guys, both ways work great Alex -- 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

[web2py] Re: records-delete/truncate postgres table in appadmin

2016-08-24 Thread Alex Glaros
what does app_cleanup do? can I truncate only one table and then run this one line clean = app_cleanup(app, request)? thanks Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2p

[web2py] Re: records-delete/truncate postgres table in appadmin

2016-08-24 Thread 黄祥
app_cleanup is the admin function cleanup to clean session, cache, dll (same like on admin page). yes, you can, app_cleanup is a prevention, because i created the function that truncate all tables including auth_user, so while u are logged in and run truncate for all table it will raises an erro

[web2py] Re: Getting only the latest "version" in a query of items with versions.

2016-08-24 Thread Encompass solutions
Does this seem sensible? It seems to work with my initial tests. latest_versions = db( (db.item.id == db.item_version.artifact_id) & (db.item_version.id > 0) ).select(db.item.ALL,db.item_version.version_date.max(), groupby=db.item.id) the .ma

[web2py] Re: Getting only the latest "version" in a query of items with versions.

2016-08-24 Thread Dave S
On Wednesday, August 24, 2016 at 10:29:09 PM UTC-7, Encompass solutions wrote: > > Does this seem sensible? It seems to work with my initial tests. > > latest_versions = db( (db.item.id == db.item_version.artifact_id) & > (db.item_version.id > 0) >

[web2py] Re: Getting only the latest "version" in a query of items with versions.

2016-08-24 Thread Encompass solutions
Grr, And now I can't get the db.item_version.ALL without Postgresql panicking about not having the item in the group buy. How do I get the fields in the result set? Do I need to place it in as a belongs or something? latest_versions = db( (db.item.id == db.item_version.artifact_id) &

[web2py] Re: Getting only the latest "version" in a query of items with versions.

2016-08-24 Thread Encompass solutions
I suppose your right, but I was a little thrown, by the: max(variable_here) That was mentioned was not the solution at all, I kept looking for ways to use max as a function. My issue now, is that the group by doesn't like me getting all the tables I want in the return. BR, Jason Brower On Thursd