[web2py] Re: repository plugin-wiki

2016-01-15 Thread Mirek Zvolský
I'm sorry for this mistake. I made a small app based on the old plugin and it works for me. Of course I want now to move to newer auth.wiki now, but I have different basic problem - I have written it to the old thread with this problem, here a copy: 2 years later I receive same error 401

Re: [web2py] Re: web2pyslices again

2016-01-15 Thread Mirek Zvolský
Thank you for the link. I think it is not so much important if something works or doesn't work there - we can still learn much from their authors. (Maybe for web2py novices and for people who select their framework could be written that here they find code examples - not always completly

[web2py] Re: Wiki.auth 401 error

2016-01-15 Thread Mirek Zvolský
2 years later I receive same error 401 UNAUTHORIZED at http://localhost:8000//activity/wiki/_create/index I made about 6 new empty applications and made some testing with auth.settings.create_user_groups and .extra_fields, but with no catch yet - always wiki works fine. But fails with my

[web2py] Re: Error No module named copy_reg after upgrading web2py

2016-01-15 Thread Massimo Di Pierro
I agree with web2py in pipy. I think removing the upgrade button would not be helpful. Users of old version would still have a broken button. On Friday, 15 January 2016 01:53:24 UTC-6, Niphlod wrote: > > @jose: you're coming from a really really old version. Unfortunately the > folder structure

[web2py] Re: Error No module named copy_reg after upgrading web2py

2016-01-15 Thread Niphlod
On Friday, January 15, 2016 at 1:51:24 PM UTC+1, Massimo Di Pierro wrote: > > I agree with web2py in pipy. I think removing the upgrade button would not > be helpful. Users of old version would still have a broken button. > > Ehm "Yeay, let's not remove a broken thing because previous builds

[web2py] Re: javascript and python in views

2016-01-15 Thread Anthony
> {{block page_js}} > > jQuery("#web2py_user_form input:visible:enabled:first").focus(); > {{if request.args(0)=='register':}} > web2py_validate_entropy(jQuery('#auth_user_password'),100); > {{elif request.args(0)=='change_password':}} >

Re: [web2py] javascript and python in views

2016-01-15 Thread Manuele Pesenti
Il 15/01/16 15:00, Pierre ha scritto: > the script mixes javascript and python expressions. How does > javascript understand python ? Is this documented in the web2py book ? In this case js does not have nothing to understand from python... you've got simply two different scripts to be executed

Re: [web2py] simple update of an cache.ram python dict

2016-01-15 Thread Richard Vézina
I ever use cache.ram... Function and function call is in models, so variable is accessible from every controller files... With Redis, this work : from gluon.contrib.redis_cache import RedisCache cache.redis = RedisCache('localhost:6379', db=None, debug=True, with_lock=False, password=None)

[web2py] Re: SQLFORM.factory with exception: user is tampering with form's record_id: != None

2016-01-15 Thread Silvan Marco Fin
Hi! Am Donnerstag, 14. Januar 2016 21:04:25 UTC+1 schrieb Anthony: > > Looks like the way you were using it before wasn't supposed to work but > did due to a bug. The purpose of the "record" argument is to enable a > database record to be updated, and so it is expected that the record will >

[web2py] javascript and python in views

2016-01-15 Thread Pierre
Hi, I found this piece of code in views/user.html: {{block page_js}} jQuery("#web2py_user_form input:visible:enabled:first").focus(); {{if request.args(0)=='register':}} web2py_validate_entropy(jQuery('#auth_user_password'),100); {{elif request.args(0)=='change_password':}}

[web2py] Re: update 2 session value using module only first session value work

2016-01-15 Thread Anthony
Sorry, this isn't very clear. It might help if you attach a minimal app that reproduces the problem. Also, it is not clear why session.sale_order_net is a dictionary with a single key of 0. It's also not advisable to use an integer as a dictionary key unless you are doing so for a special

[web2py] Using open source code in web2py app for commercial use

2016-01-15 Thread Ron Chatterjee
My assumption is, its okay to use code that reside in appliance, slices and books (cookbook and manual) for web2py application even for commercial use as long as we have "powered by web2py" on pages. Do you guys concur? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

Re: [web2py] Re: web3py

2016-01-15 Thread José Luis Redrejo
Of course, option 2. It's the most logical path for all of us. 2016-01-14 23:43 GMT+01:00 Ovidio Marinho : > 2 > > > > Sent with MailTrack > > > > > > >[image: http://itjp.net.br]

[web2py] Re: javascript and python in views

2016-01-15 Thread Pierre
thanks guys for your explanations it's clearer now -- 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

Re: [web2py] 2.13.4 ESCAPE '\\' present in SQL output of db(...)._select(...)

2016-01-15 Thread Richard Vézina
Here the error message I get when I try it in pgAdmin ERROR: invalid escape string HINT: Escape string must be empty or one character. Richard On Fri, Jan 15, 2016 at 11:54 AM, Anthony wrote: > This change was made in June to allow proper escaping of terms when using >

Re: [web2py] 2.13.4 ESCAPE '\\' present in SQL output of db(...)._select(...)

2016-01-15 Thread Niphlod
Hehehehe. Before pasting intorno pgadmin you need to unescape python's own escaping . Select * from table where field like '%foo%' escape '\' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] 2.13.4 ESCAPE '\\' present in SQL output of db(...)._select(...)

2016-01-15 Thread Richard Vézina
Pogres 9.1 On Fri, Jan 15, 2016 at 12:05 PM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > Here the error message I get when I try it in pgAdmin > > ERROR: invalid escape string > HINT: Escape string must be empty or one character. > > Richard > > On Fri, Jan 15, 2016 at 11:54 AM,

Re: [web2py] Re: web3py

2016-01-15 Thread Ron Chatterjee
Just want to clarify. When you are speaking of backward compatibility we are only interested in one way street. From web2py -> web3py and not the other way around. On Friday, January 15, 2016 at 12:13:52 PM UTC-5, Richard wrote: > > I agree with Rob... Backward compatibility have been one of

Re: [web2py] Re: web3py

2016-01-15 Thread Richard Vézina
It means that your actual app implementation with still work correctly in the next version of web2py/web3py "for ever"... Richard On Fri, Jan 15, 2016 at 12:24 PM, Ron Chatterjee wrote: > Just want to clarify. When you are speaking of backward compatibility we > are

Re: [web2py] 2.13.4 ESCAPE '\\' present in SQL output of db(...)._select(...)

2016-01-15 Thread Anthony
This change was made in June to allow proper escaping of terms when using .like, .startswith, etc. See https://github.com/web2py/pydal/commit/221146064e47bc5dcb993a1e289fc06eb7589c64. The SQL "ESCAPE" keyword just specifies the character(s) to be used for escaping within "LIKE" terms.

Re: [web2py] Re: web3py

2016-01-15 Thread Richard Vézina
I agree with Rob... Backward compatibility have been one of the most important feature of web2py until now. I do understand that rewrite an app may be different burden depending of how big app is or how customize and integrate with web2py it could be... But I think bad code should be leave behind

[web2py] development strategy

2016-01-15 Thread Pierre
I am afraid my app might break as its database size grows (db bottlenecks , any hardware/software overload). To prevent that I am thinking about dividing it by country : one independent app +database for every country. Do you think this is a good idea ? in other words centralization vs

[web2py] Re: web3py

2016-01-15 Thread Rod Watkins
Hello everyone, I've been writing web apps with web2py for about 4-5 years and I've watched the dev forum attentively, but have never spoken up before. But on the future of web2py, I have formed a few opinions. I agree that options 2 is best. I especially like the idea of writing a set of

[web2py] 2.13.4 ESCAPE '\\' present in SQL output of db(...)._select(...)

2016-01-15 Thread Richard
Hello, I notice that the web2py query below : db(db.auth_user.first_name.lower().like('%r'))._select(db.auth_user.ALL) Return that : "SELECT * FROM auth_user WHERE (LOWER(auth_user.first_name) LIKE '%r' *ESCAPE '\\'*);" Never see this before, may this is a bug? web2py 2.13.4 Richard --

Re: [web2py] 2.13.4 ESCAPE '\\' present in SQL output of db(...)._select(...)

2016-01-15 Thread Richard Vézina
So to avoid issue someone has to : print db(db.auth_user.first_name.lower().like('%r'))._select(db.auth_user.ALL) I wasn't know escape and still don't even after read the postgres doc :) Richard On Fri, Jan 15, 2016 at 1:02 PM, Niphlod wrote: > Hehehehe. Before pasting

Re: [web2py] 2.13.4 ESCAPE '\\' present in SQL output of db(...)._select(...)

2016-01-15 Thread Anthony
On Friday, January 15, 2016 at 1:28:35 PM UTC-5, Richard wrote: > > So to avoid issue someone has to : > > > print db(db.auth_user.first_name.lower().like('%r'))._select(db.auth_user.ALL) > Only if you're using the DAL to generate SQL statements to copy/paste to pgAdmin. Anthony -- Resources:

[web2py] Re: how to calculate size of uploads by user

2016-01-15 Thread Alex Glaros
oops, sorry, this line if form.vars.uploadedMeetingContent: is supposed to be if *request*.vars.uploadedMeetingContent: now am getting somewhere. Error says: 'list' object has no attribute 'value' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: how to calculate size of uploads by user

2016-01-15 Thread Alex Glaros
here is complete code.. anyone see where the problem is? The result is the file gets uploaded, no errors raised, but the content name and file-size are "None" in the resulting record. Session flashes don't display. db.define_table('UploadedMeetingMaterials', Field('id','id',

Re: [web2py] 2.13.4 ESCAPE '\\' present in SQL output of db(...)._select(...)

2016-01-15 Thread Richard Vézina
Of course no print required in .belongs() :) Richard On Fri, Jan 15, 2016 at 1:41 PM, Anthony wrote: > On Friday, January 15, 2016 at 1:28:35 PM UTC-5, Richard wrote: >> >> So to avoid issue someone has to : >> >> >> print >>

Re: [web2py] Re: web3py

2016-01-15 Thread Fabiano Almeida
2016-01-15 17:29 GMT-02:00 Carlos Cesar Caballero Díaz < desarro...@spicm.cfg.sld.cu>: > Hi, I have written about my opinion before. The backward compatibility > should never affect the system maintenance, sometimes is better just remove > the old functionalities to make way for the new ones, the

Re: [web2py] Re: How do I select and output multiple checkboxes

2016-01-15 Thread Ron Chatterjee
I couldn't get those plug in to work. There should be a way to render the form horizontally. I am surprised there there isnt! On Thursday, January 14, 2016 at 3:19:28 PM UTC-5, Richard wrote: > > There were widget plugins also for that : > https://github.com/scubism/sqlabs > > But these are

[web2py] multi tenant

2016-01-15 Thread Fabiano Almeida
Hi All! In the book shows multi tenant based on subdomain, with code : > db._common_fields.append(Field('request_tenant', >

[web2py] Re: how to calculate size of uploads by user

2016-01-15 Thread Alex Glaros
I see other examples that work, that look just like Niphlod's examples and my code. Could I have environment variables set that block cgi.FieldStorage object info? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: development strategy

2016-01-15 Thread Niphlod
how many gigabytes of data are we talking about and how many queries per sec (or,even better, the mean response time of the database) ? What's your estimated growth ? Sure, if you are around 500GB, +300queries/sec and +10k users, it'd be time to figure out a scale-out approach (in which a

[web2py] Re: how to calculate size of uploads by user

2016-01-15 Thread Niphlod
if your request.vars.something is a list, then it means that somewhere you have two fields that are coming in with the same name. trim the code to the very essential and start from there please. form = SQLFORM(db.UploadedMeetingMaterials) if request.vars.uploadedMeetingContent:

[web2py] Re: development strategy

2016-01-15 Thread Pierre
a sharp prevision in terms of Gigbytes , queries/sec, number of users is impossible at this time.. but I prefer to anticipate future problems. thanks for your help Niphlod -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: web3py

2016-01-15 Thread Matheus Cardoso
I vote option 2, but with up votes to previous points about web2py does not need to stick with 100% backward compatibility and maintain "bad code". As Carlos Cesar pointed out, 90% of compatibility is a good level and with a good migration guide it would not be a harsh. Python 3 already showed

[web2py] Re: update 2 session value using module only first session value work

2016-01-15 Thread 黄祥
the previous is not work, it's work first because it still store the previous session, after clean session, cache and error it's not work. something strange in here. e.g. *controllers* session.sale_order_net = session.sale_order_net or {} #session.sale_order_net[0] = dict(discount = 0,

[web2py] Re: update 2 session value using module only first session value work

2016-01-15 Thread 黄祥
it's just conditional logic is not applied when define the session. e.g. *controllers* if session.sale_order_net: session.sale_order_net = session.sale_order_net else: session.sale_order_net = {} session.sale_order_net[0] = dict(discount = 0, delivery_fee = 0, packing_fee = 0, stamp_fee = 0, paid

[web2py] Edit form style

2016-01-15 Thread desta
I would like to make a change a the Login form. Currently I see that the login button has a slight offset which I like to remove I tried to search for *col-sm-offset-3 *to find where the form is generated but I could only find .css files where the style is defined. I searched in the