[web2py] new feature in trunk: mail.settings.server='logging:filename'

2015-07-06 Thread Massimo Di Pierro
For testing/debug purposes we were always able to do: mail.settings.server='logging' now you can do mail.settings.server='logging:filename' and log to a file instead of using the logger. This is not really thread safe but different apps can log to different files and can help testing.

[web2py] New feature in trunk: API tokens

2015-06-28 Thread Massimo Di Pierro
There is a new feature in trunk. Support for native API tokens. To enable in models/db.py use: auth.define_tables(username=False, signature=False, api_tokens=True) Then where appropriate replace @auth.requires_login() def test(): return 'hello %s' % auth.user.first_name with @auth.requires

Re: [web2py] New feature in trunk. bulk_register/invite

2015-06-28 Thread Ovidio Marinho
ok - testing [image: http://itjp.net.br] http://itjp.net.b r *Ovidio Marinho Falcao Neto* ovidio...@gmail.com Brasil 2015-06-28 11:19 GMT-03:00 Massimo Di P

[web2py] new feature in trunk multi-word grid search.

2015-06-28 Thread Massimo Di Pierro
Until now multi world grid search would result in "invalid query", but it now works. On Google App Engine if you search for "pinco pallino" it looks into all text fields for "pinco pallino". On all the other supported backends, it search if for the separate existance of "pinco" and "pallino" in

[web2py] New feature in trunk. bulk_register/invite

2015-06-28 Thread Massimo Di Pierro
Hello web2py users, a new feature is in trunk, please help us test it. Originally developed here https://github.com/web2py/web2py/pull/985 as "invite" has been renamed as "bulk_register". It is available to all web2py applications at this user: http://127.0.0.1:8000/welcome/default/user/bulk_re

[web2py] new feature in trunk: TODO panel in admin editor

2013-12-08 Thread Paolo Valleri
Dear all, the online editor has got a new TODO panel in which are listed all TODO you might have in the current application. For the time being it highlights only TODO in python files, in the short future we will support other file types and special keywords, along with the keyword TODO I've see

[web2py] new feature in trunk

2013-10-20 Thread Massimo Di Pierro
It is a recurrent problem that is displays tree-like structures like threaded comments. For example: db.define_table('post', Field('parent_id','reference post'), Field('body')) where each comment has a body and a parent_id (parent_id==None for the root comment(s)

[web2py] New feature in trunk conditional fields RFC

2013-06-03 Thread Massimo Di Pierro
There is a new feature in trunk with needs help testing. The syntax is not yet finalized and may change. I allows to make some form fields conditional on the values of other fields. To use it you must get web2py trunk and clone welcome. To use in legacy apps you must still upgrade and replace y

[web2py] new feature in trunk: pack custom

2013-04-02 Thread Massimo Di Pierro
Can you help me test this. In the main admin site page under [pack all] there is a [pack custom] link. It allows you to select which files to include/exclude in/from the w2p file. For example you can package everything except the sqlite database. Suggestions for improvement? Massimo -- ---

Re: [web2py] new feature in trunk, redirects via routes

2012-07-02 Thread Ovidio Marinho
Ok I'll make tests in production. Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.br ITJP - itjp.net.br 83 8826 9088 - Oi 83 9334 0266 - Claro

Re: [web2py] new feature in trunk, redirects via routes

2012-07-01 Thread Alec Taylor
Wow, that looks rather useful =D On Mon, Jul 2, 2012 at 1:46 PM, Massimo Di Pierro wrote: > Please help me test this > > in routes.py you can do > > routes_in = [ >('/google', '303->http://google.com'), >('/yahoo', '303->http://yahoo.com'), >('/search/$anything', '303->http://google.c

[web2py] new feature in trunk, redirects via routes

2012-07-01 Thread Massimo Di Pierro
Please help me test this in routes.py you can do routes_in = [ ('/google', '303->http://google.com'), ('/yahoo', '303->http://yahoo.com'), ('/search/$anything', '303->http://google.com?q=$anything'), ('/hello/$anything','303->/welcome/$anything' ]

Re: [web2py] new feature in trunk: better markmin

2012-05-10 Thread Alan Etkin
That solves it. Even it's possible to populate the input with different :html instances. Perhaps could come handy to reserve a tag for html, saving the extra lambda argument. On Wednesday, May 9, 2012 2:03:00 AM UTC-3, Massimo Di Pierro wrote: > > You can use MARMIN(...,extra=dict(html=lambda x:

Re: [web2py] new feature in trunk: better markmin

2012-05-08 Thread Massimo Di Pierro
You can use MARMIN(...,extra=dict(html=lambda x: x)) then you would embed with """ ``this is html``:html """ but kind of defies the purpose and you may want to sanitize(x) On Tuesday, 8 May 2012 14:48:42 UTC-5, Alan Etkin wrote: > > Seems like it's not possible to embed HTML in markmin. Isn't

Re: [web2py] new feature in trunk: better markmin

2012-05-08 Thread Alan Etkin
Seems like it's not possible to embed HTML in markmin. Isn't it? How about allowing a user to do: >> print MARKMIN("[[[Spam]]]") Spam I think that this would be useful for dual markmin/html wisiwig editors too.

Re: [web2py] new feature in trunk: full auditing

2012-04-09 Thread Manuele Pesenti
Il 06/04/2012 01:11, Massimo Di Pierro ha scritto: Now you can. ;-) auth.enable_record_versioning(db, archive_db=other_db) Do you think could be usefull to choose the tables you want for versioning instead of every table in db? M.

Re: [web2py] new feature in trunk: full auditing

2012-04-07 Thread simon
Very useful. Brilliant thanks. Minor error - line 6951 in DAL is missing an s. Should be archive_name = '%(tablename)s_archive' On Friday, 6 April 2012 05:35:38 UTC+1, Massimo Di Pierro wrote: > > It stores all previous versions. > > On Thursday, 5 April 2012 22:29:46 UTC-5, mart wrote: >> >> M

Re: [web2py] new feature in trunk: better markmin

2012-04-06 Thread Massimo Di Pierro
This has been on the todo list for a while. It requires refactoring of the way markmin handles nested lists. If this is done, must be donefor both markmin2html and markmin2latex. I very much support this feature but it not a priority for me. If somebody wants to work on it, I will take a patch.

Re: [web2py] new feature in trunk: better markmin

2012-04-06 Thread Martin Weissenboeck
Maybe we could get nested lists? Something like - item a -- item aa -- item ab - item b Martin Am 06.04.2012 03:09 schrieb "Massimo Di Pierro" : > Consider this text > > text = """ > **bold** > ''italic'' > ``code`` > [[anchor]] > [[link to #anchor]] > http://example/image.jpg (embeds the image)

Re: [web2py] new feature in trunk: full auditing

2012-04-06 Thread Massimo Di Pierro
yes On Friday, 6 April 2012 01:58:14 UTC-5, szimszon wrote: > > And there is still a archive_db parameter? > > Like: > db.table._archive_records(archive_db=other_db) > > 2012. április 6., péntek 3:28:40 UTC+2 időpontban Massimo Di Pierro a > következőt írta: >> >> Please check it again. I did no

Re: [web2py] new feature in trunk: generic.map

2012-04-06 Thread Manuele Pesenti
+1 I think I'll propose generic_openlayers.map :-) Manuele Il 06/04/2012 01:54, Massimo Di Pierro ha scritto: Example: # model db.define_table('point', Field('name'), Field('latitude','double'), Field('longitude','double')) #controller def map(): retur

Re: [web2py] new feature in trunk: full auditing

2012-04-05 Thread szimszon
And there is still a archive_db parameter? Like: db.table._archive_records(archive_db=other_db) 2012. április 6., péntek 3:28:40 UTC+2 időpontban Massimo Di Pierro a következőt írta: > > Please check it again. I did not change the API but changed the internal > logic so that one can do: > > db

Re: [web2py] new feature in trunk: full auditing

2012-04-05 Thread Massimo Di Pierro
It stores all previous versions. On Thursday, 5 April 2012 22:29:46 UTC-5, mart wrote: > > Massimo, this is great! > > Question: does it keep a copy of the latest previous record only (I'm > sorry, I hope that made sense), or do all submitted changes get copied to > archive (a new record is sto

Re: [web2py] new feature in trunk: full auditing

2012-04-05 Thread mart
Massimo, this is great! Question: does it keep a copy of the latest previous record only (I'm sorry, I hope that made sense), or do all submitted changes get copied to archive (a new record is stored for each submitted change) ? If the answer is "all submitted changes get copied" , then I woul

[web2py] new feature in trunk: better markmin

2012-04-05 Thread Massimo Di Pierro
Consider this text text = """ **bold** ''italic'' ``code`` [[anchor]] [[link to #anchor]] http://example/image.jpg (embeds the image) http://example/image.mp3 (embeds the audio) http://example/image.mp4 (embeds the video) @{hello} (embeds the variable hello) @{controller/function/a/r/g/s.extensi

Re: [web2py] new feature in trunk: full auditing

2012-04-05 Thread Massimo Di Pierro
Please check it again. I did not change the API but changed the internal logic so that one can do: db.table._archive_records() without using auth at all. This allows use with gluino too. On Thursday, 5 April 2012 18:19:17 UTC-5, rochacbruno wrote: > > great! I am testing > > On Thu, Apr 5, 20

[web2py] new feature in trunk: generic.map

2012-04-05 Thread Massimo Di Pierro
Example: # model db.define_table('point', Field('name'), Field('latitude','double'), Field('longitude','double')) #controller def map(): return dict( googlemap_key='...', # get this from google maps center_latitude = 41.878, center_longitude

Re: [web2py] new feature in trunk: full auditing

2012-04-05 Thread Bruno Rocha
great! I am testing On Thu, Apr 5, 2012 at 8:09 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Now you can. ;-) > > auth.enable_record_versioning(db, archive_db=other_db) > > > On Thursday, 5 April 2012 17:28:43 UTC-5, rochacbruno wrote: >> >> is it possible to redirect the archive

[web2py] new feature in trunk: ics calendar serialization:

2012-04-05 Thread Massimo Di Pierro
# model: db.define_table('event', Field('title'), Field('start_datetime','datetime'), Field('stop_datetime','datetime')) # controller: def events(): response.view = 'generic.ics' events = db(db.event).select() title = 'my calendar'

Re: [web2py] new feature in trunk: full auditing

2012-04-05 Thread Massimo Di Pierro
Now you can. ;-) auth.enable_record_versioning(db, archive_db=other_db) On Thursday, 5 April 2012 17:28:43 UTC-5, rochacbruno wrote: > > is it possible to redirect the archive to a separate database? > > On Thu, Apr 5, 2012 at 7:16 PM, Massimo Di Pierro < > massimo.dipie...@gmail.com> wrote: > >

Re: [web2py] new feature in trunk: full auditing

2012-04-05 Thread Massimo Di Pierro
Now you can. ;-) auth.enable_record_versioning(db, archive_db=other_db) On Thursday, 5 April 2012 17:28:43 UTC-5, rochacbruno wrote: > > is it possible to redirect the archive to a separate database? > > On Thu, Apr 5, 2012 at 7:16 PM, Massimo Di Pierro < > massimo.dipie...@gmail.com> wrote: > >

Re: [web2py] new feature in trunk: full auditing

2012-04-05 Thread Bruno Rocha
is it possible to redirect the archive to a separate database? On Thu, Apr 5, 2012 at 7:16 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > This is how it works: > > # define auth > auth = Auth(db, hmac_key=Auth.get_or_create_key()) > auth.define_tables(username=True,signature=True) >

[web2py] new feature in trunk: full auditing

2012-04-05 Thread Massimo Di Pierro
This is how it works: # define auth auth = Auth(db, hmac_key=Auth.get_or_create_key()) auth.define_tables(username=True,signature=True) # define your own tables like db.define_table('mything',Field('name'),auth.signature) # than do: auth.enable_record_versioning(db) how does it work? every tab

[web2py] new feature in trunk, for teachers mostly

2012-03-26 Thread Massimo Di Pierro
edit applications/admin/models/0.py and set MULTI_USER_MODE = True then register and login in the admin. The first user to login is the "teacher". You will see two new buttons "manage students" and "bulk register". You can use the bulk register page to give accounts to all your students. They c

[web2py] new feature in trunk...

2012-02-21 Thread Massimo Di Pierro
not sure if it should stay and for sure it can be improved. I use it a lot. def index(): import os from gluon.tools import Expose return dict(expose=Expose(os.path.join(request.folder,'static')))

Re: [web2py] new feature in trunk ... help test

2012-01-29 Thread Bruno Rocha
I like the idea. Currently I am loading user groups on login. I just think it have to be called auth.user_groups so it will be more compatible with auth.user_id http://zerp.ly/rochacbruno Em 29/01/2012 23:17, "Massimo Di Pierro" escreveu: > > auth.mygroups > > is a dictionary of (key,value) = (g

[web2py] new feature in trunk ... help test

2012-01-29 Thread Massimo Di Pierro
auth.mygroups is a dictionary of (key,value) = (group_id,role) This makes it easy to create objects like db.define_table('thing', Field('name'), Field('groups_with_access','list:reference auth_group')) and select them with mythings = db(db.thing.groups_with_access.contains(auth.mygroup

Re: [w2py-dev] Re: [web2py] new feature in trunk: auth.settings.login_after_registration

2011-08-26 Thread Massimo Di Pierro
I did not check it but I think your idea below should work. Check trunk. On Aug 26, 2011, at 1:36 AM, Bruno Rocha wrote: > Very nice feature, I am using. but there is a small problem. > > to reproduce do this: > > set: > auth.settings.registration_requires_verification = True > auth.settings.l

Re: [web2py] new feature in trunk: auth.settings.login_after_registration

2011-08-25 Thread Bruno Rocha
temporarily solved with auth.settings.verify_email_next = URL(r=request, c='default', f='user', args='logout') so when user loggin again he got no auth.user.registration_key But, there is a way to do it inside tools.py verify_email ?

Re: [web2py] new feature in trunk: auth.settings.login_after_registration

2011-08-25 Thread Bruno Rocha
Or, we need to logout the user and force the to login again.

Re: [web2py] new feature in trunk: auth.settings.login_after_registration

2011-08-25 Thread Bruno Rocha
Very nice feature, I am using. but there is a small problem. to reproduce do this: set: auth.settings.registration_requires_verification = True auth.settings.login_after_registration = True decorate action with: @auth.requires(auth.user and not auth.user.registration_key) user registers and log

[web2py] new feature in trunk: auth.settings.login_after_registration

2011-08-25 Thread Massimo Di Pierro
Some times I need the following: I want people to register and be able to play with some parts of the app but not everything until they verify their email. yet I do not want them to have to wait for the email in oder to se the system. Now (in trunk) you can do: auth.settings.registration