Re: [web2py] Re: New feature in trunk conditional fields RFC

2017-01-06 Thread Meinolf
Hello How do i implement these conditional fields in a custom auth table? I tried the following but does not seem to hide the grade field. #Start of definition of custom Auth tables to be used instead of the default ones. auth = Auth(db) db.define_table(auth.settings.table_user_name,

[web2py] Re: new feature in trunk

2016-06-03 Thread Alex Glaros
okay, got this below to work but am confused about the resulting order data is displayed in. DATA post.id post.parent_id post.body

[web2py] Re: new feature in trunk

2016-06-03 Thread Alex Glaros
how to pass it to the view? -- 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 Groups

[web2py] Re: new feature in trunk

2016-06-01 Thread Anthony
You've defined show() in a controller but are attempting to call it in a view without passing it to the view. Either pass show to the view, define it in a model, or put it in a module and import it in the view. Anthony On Wednesday, June 1, 2016 at 3:11:31 PM UTC-4, Alex Glaros wrote: > >

[web2py] Re: new feature in trunk

2016-06-01 Thread Dave S
On Wednesday, June 1, 2016 at 2:16:47 PM UTC-7, Alex Glaros wrote: > > what would the syntax be Dave? I don't know how to move a def into another > def.. > Cut, paste, and adjust the indentation. As the Python docs say, "Programmer’s note: Functions are first-class objects. A “def” form

[web2py] Re: new feature in trunk

2016-06-01 Thread Alex Glaros
what would the syntax be Dave? I don't know how to move a def into another def... -- 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

[web2py] Re: new feature in trunk

2016-06-01 Thread Dave S
On Wednesday, June 1, 2016 at 12:11:31 PM UTC-7, Alex Glaros wrote: > > getting closer > > Controller > > def show(row,n=0): >return ' '*n+row.body+'\n'+''.join(show(c,n+1) for c in row.children) > > def view_all_objects_in_a_taxonomy(): >roots =

[web2py] Re: new feature in trunk

2016-06-01 Thread Alex Glaros
getting closer Controller def show(row,n=0): return ' '*n+row.body+'\n'+''.join(show(c,n+1) for c in row.children) def view_all_objects_in_a_taxonomy(): roots = db(db.taxonomy_column).select().as_trees(parent_name= "taxonomy_column_parent_fk") return locals() View -

[web2py] Re: new feature in trunk

2016-06-01 Thread Anthony
No, you define a function like show() in Massimo's example, and then you just call that function: {{=show(roots[0])}} show() is called recursively. The default/initial value of "n" is 0 (you don't need to specify that), and the recursive calls automatically increment n by 1. Anthony On

[web2py] Re: new feature in trunk

2016-06-01 Thread Alex Glaros
can someone show me syntax for use outside of the "return" statement? In other words, I want to run and display data within a larger function than the example, that already has vars and data I need, and displays other data that needs to appear. My model is self-referencing table with link to

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

2015-10-30 Thread James Burke
Thank you Massimo. Also I just noticed the subject line variable line 1255: bulk_invite_subject='Invitation to join%(site)s’, Should be: bulk_invite_subject='Invitation to join %(site)s’, And if I may suggest exposing bulk_register_enabled in the welcome app models/dp.py file to alert

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

2015-10-29 Thread Massimo Di Pierro
fixed in trunk On Monday, 26 October 2015 14:24:50 UTC-5, James Burke wrote: > > Ok I've done some testing and found a couple of typos, including, > tools.py - line 3283: > > if not self.setting.bulk_register_enabled: > > > should be > > if not self.settings.bulk_register_enabled: > > > This

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

2015-10-26 Thread James Burke
Ok I've done some testing and found a couple of typos, including, tools.py - line 3283: if not self.setting.bulk_register_enabled: should be if not self.settings.bulk_register_enabled: This results in an exception preventing the feature from working. I tried submitting a pull request

[web2py] Re: New feature in trunk: API tokens

2015-07-13 Thread Derek
It's pretty much like client side cookies for sessions. On Thursday, July 9, 2015 at 10:45:30 PM UTC-7, Massimo Di Pierro wrote: Can you elaborate. I like the current system (I wrote it ;-) but I was considering adding jwt. The question is, is there duplication of functionality? Should jwt

Re: [web2py] Re: New feature in trunk: API tokens

2015-07-10 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 diff --git a/applications/welcome/controllers/default.py b/applications/welcome/controllers/default.py index c775603..e99ef0f 100644 --- a/applications/welcome/controllers/default.py +++ b/applications/welcome/controllers/default.py @@ -57,4

Re: [web2py] Re: New feature in trunk: API tokens

2015-07-10 Thread Pablo Angulo
Sorry, I see signing the email scrambled the patch: diff --git a/applications/welcome/controllers/default.py b/applications/welcome/controllers/default.py index c775603..e99ef0f 100644 --- a/applications/welcome/controllers/default.py +++ b/applications/welcome/controllers/default.py @@

[web2py] Re: New feature in trunk: API tokens

2015-07-09 Thread Massimo Di Pierro
Can you elaborate. I like the current system (I wrote it ;-) but I was considering adding jwt. The question is, is there duplication of functionality? Should jwt replace the current token system? pros/cons? On Thursday, 9 July 2015 15:02:43 UTC-5, Derek wrote: Yes, I did read up on it, and I

[web2py] Re: New feature in trunk: API tokens

2015-07-09 Thread Niphlod
do you know what a jwt token is instead of just blindly bashing a solution? this adds a table potentially growing towards infinite (to maintain), two queries, creates the session, for each and every request: all of which is unnecessary. It's web2py's proprietary, needs to be managed within a

[web2py] Re: New feature in trunk: API tokens

2015-07-09 Thread Massimo Di Pierro
I think we should support jwt. Niphlod. Can you provide an implementation? On Thursday, 9 July 2015 01:16:43 UTC-5, Niphlod wrote: do you know what a jwt token is instead of just blindly bashing a solution? this adds a table potentially growing towards infinite (to maintain), two queries,

[web2py] Re: New feature in trunk: API tokens

2015-07-09 Thread Derek
Yes, I did read up on it, and I am familiar with jwt. I do think it's more insecure than this. On Wednesday, July 8, 2015 at 11:16:43 PM UTC-7, Niphlod wrote: do you know what a jwt token is instead of just blindly bashing a solution? On Thursday, July 9, 2015 at 12:25:54 AM UTC+2, Derek

[web2py] Re: New feature in trunk: API tokens

2015-07-08 Thread Niphlod
summarizing, IMHO web2py should probably implement JWT tokens http://jwt.io/ instead of this custom one to have it called properly API tokens -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: New feature in trunk: API tokens

2015-07-08 Thread Derek
The only difference between this and jwt (saying jwt tokens is like saying atm machine, it's redundant) is that jwt can be generated client side (provided the client knows the secret) and thus would be less secure than this. On Wednesday, July 8, 2015 at 1:16:31 PM UTC-7, Niphlod wrote:

Re: [web2py] Re: New feature in trunk: API tokens

2015-07-01 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Just one more comment: I wrote hash(SALT+request.url+'#'+user_id) but meant hash(SUPER_SECRET_GLOBAL_PASSWORD+request.url+'#'+user_id) El 01/07/15 a las 00:06, Pablo Angulo escribió: This email was going to be a simple Great!, but eventually I

Re: [web2py] Re: New feature in trunk: API tokens

2015-06-30 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 This email was going to be a simple Great!, but eventually I have many comments: El 29/06/15 a las 20:37, Massimo Di Pierro escribió: 2. yes that is correct (except it is _token=, not token=). Just mind that the token is as good as a password

Re: [web2py] Re: New feature in trunk: API tokens

2015-06-29 Thread pang
Hello: I'm actually interested in a way to send user notification emails with custom links, so that a click sends the user to the website and also logs the user in automatically. Is that what these tokens are for? If they are, I don't see why I would use the decorator requires_login some

Re: [web2py] Re: New feature in trunk: API tokens

2015-06-29 Thread Massimo Di Pierro
You can use these tokens for your purpose. You would also have to do (in models/db.py) auth.requires_login = auth.requires_login_or_token In the general case the user many want to allow the token only on some API so we want to distinguish. Massimo On Monday, 29 June 2015 09:25:35 UTC-5,

Re: [web2py] Re: New feature in trunk: API tokens

2015-06-29 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 ok, thanks! But I have two questions: 1. what can I do with auth.requires_membership and auth.requires(custom_function), which I use a lot? 2. so if I have to send an email, all I have to do is find the use token in the database with: user_token

Re: [web2py] Re: New feature in trunk: API tokens

2015-06-29 Thread Massimo Di Pierro
1. This should work @auth.requires_login_or_token() @auth.requires_membership('whatever') def youtfunction(): 2. yes that is correct (except it is _token=, not token=). Just mind that the token is as good as a password and may be unsafe to send it via email. If if you need it, you can do

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

2015-06-28 Thread Massimo Di Pierro
OK but notice, anybody, not even logged in, can already register using somebody else's email address and that person would receive an unwanted email with a link to verify their email. Unless registration_requires_approval is set False. So perhaps the condition should only kick in if

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

2015-06-28 Thread Anthony
I don't think this should be exposed by default for all users -- it should be disabled by default and only enabled when done so explicitly by the developer. I would think you would only want to expose this kind of functionality to admin/trusted users -- otherwise, you are providing a way for

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

2015-06-28 Thread Massimo Di Pierro
I have done what you suggest, except for the cleanup-script. I added auth.settings.bulk_register_enabled = False We can than leave to the developer to do something like: self.setting.bulk_register_enabled = auth.has_membership(role='whatever') On Sunday, 28 June 2015 10:05:45 UTC-5, Massimo

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

2015-06-28 Thread Anthony
On Sunday, June 28, 2015 at 11:05:45 AM UTC-4, Massimo Di Pierro wrote: OK but notice, anybody, not even logged in, can already register using somebody else's email address and that person would receive an unwanted email with a link to verify their email. Unless

[web2py] Re: New feature in trunk: API tokens

2015-06-28 Thread Niphlod
IMHO token should not be restricted to a var... it should be also possible to use an header... Performance-wise...as it is it's as bad as it could possibly be. 1) the extra table needs a solid unique=True on the token field: we don't want to do a full scan of that table for every request

[web2py] Re: New feature in trunk: API tokens

2015-06-28 Thread Niphlod
PS: the code doesn't take into consideration an expired token. the mere existance of the record allows the authentication. -- 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] Re: New feature in trunk: API tokens

2015-06-28 Thread Niphlod
Ok, read it carefullyAll of that IMHO isn't really what users wants to implement a token-based auth on top of an API. Apart from the fact that if the scheme of the tokens table gets corrected (a FK to the user_id and token unique) the first two queries are collapsible into one, calling

[web2py] Re: New feature in trunk: API tokens

2015-06-28 Thread Massimo Di Pierro
as you suggested I added unique=True as you suggested I reduced the number of db queries from 2 to 1 (when not on GAE) yes it should check for expiration (will add that) as you suggested you can now use a header (web2py_api_token) instead of ?_token=... I think the manage_tokens page is useful

Re: [web2py] Re: New feature in trunk: API tokens

2015-06-28 Thread Jason (spot) Brower
Name: Bearer Token? http://self-issued.info/docs/draft-ietf-oauth-v2-bearer.html Or am I wrong? On Mon, Jun 29, 2015 at 1:08 AM Massimo Di Pierro massimo.dipie...@gmail.com wrote: as you suggested I added unique=True as you suggested I reduced the number of db queries from 2 to 1 (when not

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

2014-12-21 Thread LightDot
Didn't have time to take look yet, but If I understand correctly, just make a comment in any .py file, starting with TODO and it will show in the panel. This is similar to e.g. Sublime text's SublimeTODO plugin and others... I suggest looking at those for ideas, e.g. SublimeTODO shows comments

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

2014-12-21 Thread LoveWeb2py
Wow! Awesome. Thank you -- 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 Groups

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

2014-12-20 Thread LoveWeb2py
How do we add to the TODO panel? I've tried double clicking and looking for additional documentation but can't seem to find anything. On Sunday, December 8, 2013 4:36:00 AM UTC-5, Paolo Valleri wrote: Dear all, the online editor has got a new TODO panel in which are listed all TODO you

[web2py] Re: new feature in trunk

2013-12-31 Thread Nguyen Minh Tuan
I tried to use with MS SQL but this function seem error! On Thursday, October 24, 2013 3:35:38 PM UTC+7, Arnon Marcus wrote: How would this work internally? What queries would be generated? How many queries would be generated? At what points in time would queries be executed? Would that be

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

2013-12-10 Thread Gael Princivalle
Hi Paolo. Sorry, where is this TODO panel ? Regards. Il giorno domenica 8 dicembre 2013 10:36:00 UTC+1, Paolo Valleri ha scritto: 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

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

2013-12-10 Thread paolo.vall...@gmail.com
Hi, At the moment it is placed in the admin editor. Have a look there,in the footer there is a button called “todo“ ,click there :-P Il giorno 10/dic/2013 15:02, Gael Princivalle gaelprinciva...@gmail.com ha scritto: Hi Paolo. Sorry, where is this TODO panel ? Regards. Il giorno domenica 8

[web2py] Re: new feature in trunk

2013-10-24 Thread Arnon Marcus
How would this work internally? What queries would be generated? How many queries would be generated? At what points in time would queries be executed? Would that be a lazy execution? We have many such tables in our project, so this is a big interest of ours to have this work as best it can. The

[web2py] Re: new feature in trunk

2013-10-22 Thread Dave S
On Monday, October 21, 2013 10:56:52 PM UTC-7, webpypy wrote: very nice what about the display of the tree in the view ? maybe as a column in a table. I would think that nested ul's would also be a natural choice. /dps -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: new feature in trunk

2013-10-22 Thread Dave S
On Tuesday, October 22, 2013 10:41:43 AM UTC-7, Dave S wrote: On Monday, October 21, 2013 10:56:52 PM UTC-7, webpypy wrote: very nice what about the display of the tree in the view ? maybe as a column in a table. I would think that nested ul's would also be a natural choice.

[web2py] Re: new feature in trunk

2013-10-21 Thread Mirko
Hi Massimo, this is a very promising feature ! My quick two cents: Why not turn this generic by replacing the 'body' field with a 'node_name' field and add an attribute node table ? For example: db.define_table('node', Field('parent_id','reference node'),

[web2py] Re: new feature in trunk

2013-10-21 Thread Niphlod
ouch the easiest model to update, the worst to query. I was going to post a plugin for threaded comments but then life kicked in with lots of other requirements, and then other things got priority in web2py. I don't think this will be compatible with what I've done 'cause I use a totally

[web2py] Re: new feature in trunk

2013-10-21 Thread Massimo Di Pierro
Actually mine was an example. as_trees() does not dictate a model. The only requirement is that the model must have a self referencing field. You can call it any way you like it. You can pass its name as first argument of as_trees(). On Monday, 21 October 2013 05:55:44 UTC-5, Niphlod wrote:

Re: [web2py] Re: new feature in trunk

2013-10-21 Thread Richard Vézina
That cool Massimo! Thanks for this... Richard On Mon, Oct 21, 2013 at 3:26 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Actually mine was an example. as_trees() does not dictate a model. The only requirement is that the model must have a self referencing field. You can call it

[web2py] Re: new feature in trunk

2013-10-21 Thread webpypy
very nice what about the display of the tree in the view ? maybe as a column in a table. -- 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

[web2py] Re: New feature in trunk conditional fields RFC

2013-06-05 Thread Jose
Hello Massimo with custom.form not work {{extend 'layout.html'}} {{=form.custom.begin}} p{{=form.custom.label.aa}}:/p p{{=form.custom.widget.aa}}/p p{{=form.custom.label.bb}}:/p p{{=form.custom.widget.bb}}/p p{{=form.custom.submit}}/p {{=form.custom.end}} José -- ---

[web2py] Re: New feature in trunk conditional fields RFC

2013-06-05 Thread Massimo Di Pierro
works if you replace p{{=form.custom.label.bb}}:/p p{{=form.custom.widget.bb}}/p with div class=thing_bb__raw p{{=form.custom.label.bb}}:/p p{{=form.custom.widget.bb}}/p /div there must a tag with class table_field__row that delimits what should be hidden. On Wednesday, 5

[web2py] Re: New feature in trunk conditional fields RFC

2013-06-05 Thread Jose
El miércoles, 5 de junio de 2013 11:53:18 UTC-3, Massimo Di Pierro escribió: works if you replace p{{=form.custom.label.bb}}:/p p{{=form.custom.widget.bb}}/p with div class=thing_bb__raw p{{=form.custom.label.bb}}:/p p{{=form.custom.widget.bb}}/p /div there must

[web2py] Re: New feature in trunk conditional fields RFC

2013-06-05 Thread Niphlod
@ Massimo: just wondering. Wouldn't it be better if the hidden input gets disabled too ? -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to

[web2py] Re: New feature in trunk conditional fields RFC

2013-06-05 Thread Massimo Di Pierro
right. div class=thing_bb__row p{{=form.custom.label.bb}}:/p p{{=form.custom.widget.bb}}/p /div does this work? On Wednesday, 5 June 2013 12:09:00 UTC-5, Jose wrote: El miércoles, 5 de junio de 2013 11:53:18 UTC-3, Massimo Di Pierro escribió: works if you replace

[web2py] Re: New feature in trunk conditional fields RFC

2013-06-05 Thread Jose
El miércoles, 5 de junio de 2013 20:32:37 UTC-3, Massimo Di Pierro escribió: right. div class=thing_bb__row p{{=form.custom.label.bb}}:/p p{{=form.custom.widget.bb}}/p /div No, does not work this becomes: div class=thing_bb__row pBb:/p pinput class=string

[web2py] Re: New feature in trunk conditional fields RFC

2013-06-05 Thread Massimo Di Pierro
One more try: div id=thing_bb__row p{{=form.custom.label.bb}}:/p p{{=form.custom.widget.bb}}/p /div On Wednesday, 5 June 2013 18:56:16 UTC-5, Jose wrote: El miércoles, 5 de junio de 2013 20:32:37 UTC-3, Massimo Di Pierro escribió: right. div class=thing_bb__row

[web2py] Re: New feature in trunk conditional fields RFC

2013-06-05 Thread Massimo Di Pierro
I do not think so. I think there is a value in carrying on the values of hidden fields when editing a record. Otherwise their values may be lost. On Wednesday, 5 June 2013 13:24:36 UTC-5, Niphlod wrote: @ Massimo: just wondering. Wouldn't it be better if the hidden input gets disabled too ?

[web2py] Re: New feature in trunk conditional fields RFC

2013-06-05 Thread Jose
El miércoles, 5 de junio de 2013 21:38:06 UTC-3, Massimo Di Pierro escribió: One more try: div id=thing_bb__row p{{=form.custom.label.bb}}:/p p{{=form.custom.widget.bb}}/p /div it does work Jose -- --- You received this message because you are subscribed to the Google Groups

[web2py] Re: New feature in trunk conditional fields RFC

2013-06-04 Thread Niphlod
it works, but a few hiccups with the examples posted def index1(): shows bb only if aa is checked db.define_table('thing', Field('aa','boolean'),Field('bb')) db.thing.bb.show_if = db.thing.aa==True form = SQLFORM(db.thing) return locals() def index2(): shows bb

Re: [web2py] Re: New feature in trunk conditional fields RFC

2013-06-04 Thread António Ramos
Show if =visible when No dia 04/06/2013 21:51, Niphlod niph...@gmail.com escreveu: it works, but a few hiccups with the examples posted def index1(): shows bb only if aa is checked db.define_table('thing', Field('aa','boolean'),Field('bb')) db.thing.bb.show_if =

Re: [web2py] Re: New feature in trunk conditional fields RFC

2013-06-04 Thread Niphlod
yep. BTW: this just hides the field. if someone fills the bb field, it gets sent with the form anyway. On Tuesday, June 4, 2013 10:55:31 PM UTC+2, Ramos wrote: Show if =visible when No dia 04/06/2013 21:51, Niphlod nip...@gmail.com javascript: escreveu: it works, but a few hiccups with

Re: [web2py] Re: New feature in trunk conditional fields RFC

2013-06-04 Thread Niphlod
BTW2: doesn't work on LOADed forms. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit

Re: [web2py] Re: New feature in trunk conditional fields RFC

2013-06-04 Thread Niphlod
fix for that. function web2py_show_if(target) { var triggers = {}; var show_if = function () { var t = jQuery(this); var id = t.attr('id'); t.attr('value', t.val()); for(var k = 0; k triggers[id].length; k++) { var dep = jQuery('#' + triggers[id][k], target); var

Re: [web2py] Re: New feature in trunk conditional fields RFC

2013-06-04 Thread Massimo Di Pierro
Uploading to trunk. Please check it. On Tuesday, 4 June 2013 16:25:15 UTC-5, Niphlod wrote: fix for that. function web2py_show_if(target) { var triggers = {}; var show_if = function () { var t = jQuery(this); var id = t.attr('id'); t.attr('value', t.val()); for(var

[web2py] Re: new feature in trunk: pack custom

2013-04-03 Thread Lamps902
Thanks, Massimo - great feature! I was going to ask for something like this, as it's extremely useful for cases when you have a large upload folder, and would like to quickly back up the code, but not the user-uploaded files. On Tuesday, April 2, 2013 3:22:50 PM UTC-5, Massimo Di Pierro wrote:

[web2py] Re: new feature in trunk, for teachers mostly

2012-12-22 Thread Jurgis Pralgauskis
How can I setup EMAIL_SERVER to use gmail? default is: EMAIL_SERVER = 'localhost' and what is the meaning of EMAIL_LOGIN = None ? Thanks in advance :) 2012 m. kovas 27 d., antradienis 06:32:31 UTC+3, Massimo Di Pierro rašė: edit applications/admin/models/0.py and set MULTI_USER_MODE =

[web2py] Re: new feature in trunk, for teachers mostly

2012-12-22 Thread Massimo Di Pierro
Yes mail.settings.sender = 'smtp.gmail.com' mail.settings.login = 'y...@gmail.com:password' On Saturday, 22 December 2012 20:52:04 UTC-6, Jurgis Pralgauskis wrote: How can I setup EMAIL_SERVER to use gmail? default is: EMAIL_SERVER = 'localhost' and what is the meaning of EMAIL_LOGIN =

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

2012-11-07 Thread Martín Miranda
(2, 0, 9, datetime.datetime(2012, 9, 13, 23, 51, 30), 'stable') Python Python 2.7.3: /usr/bin/python Traceback 1. 2. 3. 4. 5. 6. 7. 8. Traceback (most recent call last): File /home/www-data/web2py/gluon/restricted.py, line 209, in restricted exec ccode in environment File

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

2012-07-06 Thread Fabiano Faver
Will it be implemented in 2.0? I would like to use something like this, but I don`t know how to do it yet. Any tips that I can build a manager_group that can manage who belongs to the other groups? Em domingo, 29 de janeiro de 2012 23h17min06s UTC-2, Massimo Di Pierro escreveu:

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

2012-07-02 Thread Alan
would it be possible to have css ID as well as class in markmin? : for class :: for id? so in a table - **A** | **B** | **C** 0 | 0 | X 0 | X | 0 X | 0 | 0 -:abc::idfortable

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

2012-06-14 Thread villas
Here is a patch. I hope it OK. I tested it on some of my image links and it seemed to be OK, but I do not know how to run tests. Thanks, David On Thursday, June 14, 2012 1:58:01 AM UTC+1, Massimo Di Pierro wrote: ok. send me a patch. On Wednesday, 13 June 2012 19:38:05 UTC-5, villas

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

2012-06-14 Thread villas
Hi Massimo, regex_auto_image = re.compile(r '(?![\w/=])(?Pk\w+://\S+\.(jpeg|jpg|gif|png)(\?\S+)?)',re.M) I believe that automatic recognition of files only works with lower case. Do you think it should be case-insensitive? e.g. .jpg .JPG .Jpg Thanks, David

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

2012-06-14 Thread Massimo Di Pierro
Please open a ticket and link this thread/patch. Will look at it asap. On Thursday, 14 June 2012 10:31:12 UTC-5, villas wrote: Hi Massimo, regex_auto_image = re.compile(r '(?![\w/=])(?Pk\w+://\S+\.(jpeg|jpg|gif|png)(\?\S+)?)',re.M) I believe that automatic recognition of files only works

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

2012-06-14 Thread villas
Issue 854 http://code.google.com/p/web2py/issues/detail?id=854 Thanks.

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

2012-06-13 Thread villas
Hi Massimo, I notice in markmin that an image is centered using P tags like this: p align=centerimg.. /p The problem is that HTML attributes are over-ruled by CSS. Therefore this 'align' attribute is usually ignored. I am wondering therefore whether we could do something like this

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

2012-06-13 Thread Massimo Di Pierro
ok. send me a patch. On Wednesday, 13 June 2012 19:38:05 UTC-5, villas wrote: Hi Massimo, I notice in markmin that an image is centered using P tags like this: p align=centerimg.. /p The problem is that HTML attributes are over-ruled by CSS. Therefore this 'align' attribute is

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

2012-04-16 Thread Johann Spies
Will this auditing also work with changes in data that does not come from form-submission? Say for instance I run a batch update/delete from a script or using 'selectable' in a grid to select a number of records to be deleted, will that not bypass the auditing? I ask because calculated fields

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

2012-04-16 Thread Massimo Di Pierro
Yes but if you do a batch delete or update web2py has to copy all records from one table to another one by one. That may cause a significati slowdown that will lock the db for long time. It may have bad consequences. On Monday, 16 April 2012 04:56:54 UTC-5, Johann Spies wrote: Will this

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

2012-04-16 Thread Johann Spies
On 16 April 2012 15:18, Massimo Di Pierro massimo.dipie...@gmail.comwrote: Yes but if you do a batch delete or update web2py has to copy all records from one table to another one by one. That may cause a significati slowdown that will lock the db for long time. It may have bad consequences.

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

2012-04-16 Thread Massimo Di Pierro
No. Batch operations do not bypass the auditing process. On Monday, 16 April 2012 08:52:22 UTC-5, Johann Spies wrote: On 16 April 2012 15:18, Massimo Di Pierro massimo.dipie...@gmail.comwrote: Yes but if you do a batch delete or update web2py has to copy all records from one table to

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

2012-04-16 Thread Johann Spies
On 16 April 2012 16:03, Massimo Di Pierro massimo.dipie...@gmail.comwrote: No. Batch operations do not bypass the auditing process. Thanks. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

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

2012-04-15 Thread Massimo Di Pierro
Fixed in trunk. On Saturday, 14 April 2012 23:10:18 UTC-5, tomt wrote: I discovered why the archive table wasn't being created, there is a typo in gluon/tools.py at line 1293: for table in tables: if 'modifed_on' in table.fields(): should be for table in

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

2012-04-14 Thread tomt
I discovered why the archive table wasn't being created, there is a typo in gluon/tools.py at line 1293: for table in tables: if 'modifed_on' in table.fields(): should be for table in tables: if 'modified_on' in table.fields(): Now the the

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

2012-04-13 Thread tomt
I'm have been trying to test this new audit function in trunk, but so far the mything_archive table has never been created in any of my tests. Is this the current state of the implementation, or am I missing something? I downloaded the latest trunk and used it web2py admin to create a new app.

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

2012-04-11 Thread Rakesh Singh
Thanks Massimo. Will do. I'll test it against Oracle today as well. On Wednesday, 11 April 2012 06:40:56 UTC+2, Massimo Di Pierro wrote: This helps a lot. WIll check this asap. To make sure I do not foget and it tracked, plase open an issue in google code. On Tuesday, 10 April 2012

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

2012-04-10 Thread Massimo Di Pierro
I figured this out. The table has a self reference and web2py inserts a zero in it instead of NULL. Works for sqlite but not MySQL. Changing zero with NULL may be treated as a bug fix it will constitute a minor change of backward compatibility in case you incorrectly do

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

2012-04-10 Thread Massimo Di Pierro
Actually I was wrong. this is not the problem. Web2py does the right thing. Is there any way you can look into the mysql logs what is the sql string that causes the problem? On Tuesday, 10 April 2012 08:23:03 UTC-5, Massimo Di Pierro wrote: I figured this out. The table has a self reference

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

2012-04-10 Thread Richard Vézina
Hi, It looks like a great new feature... I would suggest something. Instead of copying every update, I would keep the records only once the it gets in a particular state. In my case a records could have no review, can be reviewed and approved, so I just want to keep the changes that occured once

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

2012-04-10 Thread Massimo Di Pierro
I agree that is people would normally use the feature. And that's a matter of deleting older archived records. What I am not sure is if it should be built-in into web2py. If would be easy to do db(db.table_archive).delete() which event should trigger it? perhaps this is one of those actions

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

2012-04-10 Thread Rakesh Singh
Hi Massimo, Regarding the MySQL error, re-created the database and started a new app with auth.signature=True Here is the auth_user creation log on MySQL followed by the insert that generates the error : CREATE TABLE auth_user( id INT AUTO_INCREMENT NOT NULL, first_name VARCHAR(128),

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

2012-04-10 Thread Massimo Di Pierro
This helps a lot. WIll check this asap. To make sure I do not foget and it tracked, plase open an issue in google code. On Tuesday, 10 April 2012 14:12:38 UTC-5, Rakesh Singh wrote: Hi Massimo, Regarding the MySQL error, re-created the database and started a new app with

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

2012-04-09 Thread Massimo Di Pierro
the signature=True only adds a signature to the auth_* tables so that if a user creates an account for another user or creates a group, you can keep track of who did it. The mything_archive table should be created by: auth.enable_record_versioning(db) This should be called after the mything

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

2012-04-09 Thread tomt
I have declared the table in db.py with auth.signature, and uncommented auth.enable_record_versioning(db), but the _archive table isn't created. - Tom On Monday, April 9, 2012 8:33:18 AM UTC-6, Massimo Di Pierro wrote: the signature=True only adds a signature to the auth_* tables so that if a

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

2012-04-08 Thread Massimo Di Pierro
Can you try again with mysql, delete the database and replace: auth.define_tables(signature=True) with auth.define_tables(signature=False) Does the problem does away? It looks like it does not like the self reference in auth_user. On Saturday, 7 April 2012 22:09:31 UTC-5, tomt wrote: Hi,

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

2012-04-08 Thread Rakesh Singh
Hi, I have received the same error as Tom on MySQL (5.5.22) when adding a user to the auth_user table via the Database Administration screen. (1452, u'Cannot add or update a child row: a foreign key constraint fails) Reverting back to signature=False resulted in an error (Trace below) :

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

2012-04-08 Thread tomt
Hi, Thanks for your response. I deleted the database as you suggested and changed signature=False. The problem did go away and I was able to add users without the error. I then reverted to signature=True. While subsequent modifications did show the signature, the 'mything_archive' was

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

2012-04-07 Thread tomt
Hi, I tried using your new versioning feature in trunk. I created an app using a mysql database: db = DAL('mysql://version:version@localhost/version') When I used the admin function to define a new user I received the following error: class

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

2012-04-06 Thread villas
Hi Massimo I love to see improvements to Markmin, it's great. One thing that I do is substituting my own special 'tags' in my Markmin text with info from my 'Snippets' table which contains standard paragraphs. For example... My special tag in Markmin text is: {id} Or, more flexibly:

  1   2   >