[web2py] Re: Support for internationalization in web2py wiki

2013-05-28 Thread Daniel Gonzalez
In the same way as internationalization is handled in the T operator? That means that an "accept-language: it- it" would tell the wiki engine to look for pages corresponding to the URL which are marked in the database as being in italian. That means: 1. a new field is needed in the database

[web2py] Re: DAL not wrapping native DB exceptions

2013-05-28 Thread Anthony
This doesn't appear to be documented, and I'm not sure it's intended to be part of the public API, but you can do: try: db.mytable.insert(...) except db._adapter.integrity_error(): [do something] There is also db._adapter.operational_error(). Not sure these work with all adapters. More

[web2py] Re: DAL not wrapping native DB exceptions

2013-05-28 Thread Kernc
On Saturday, June 19, 2010 8:25:11 AM UTC+2, Narendran wrote: > > when I insert a row that violates the unique > constraint of OFFER_TITLE, it returns > _mysql_exceptions.IntegrityError, which is a DB specific error You can generally catch these underlying DAL engine exceptions with: try:

Re: [web2py] Re: PAAS supporting web2py

2013-05-28 Thread Curiouslearn
Hi Arvind, Of these I have tried Pythonanywhere and Dotcloud. It is quite easy to deploy web2py app on both of these. I tried Pythonanywhere a long time ago. It is reasonable in terms of price, but was a little slow in serving pages. Probably that has changed; I am not sure. Dotcloud on the othe

[web2py] Re: PAAS supporting web2py

2013-05-28 Thread Christian Foster Howes
i use GAE with BigTable for some live sites. from a teaching perspective there are some pros and cons. pros: - there is a free daily allotment, though it is quite small - all managed via web interfaces that are pretty easy to navigate cons: - web2py admin and code editor don't work. - i wou

Re: [web2py] Restful authentication and CORS

2013-05-28 Thread Christian Foster Howes
i have configured my system to be an oauth provider and added a decorator to all RESTful calls to validate the oauth signature. yes, i do this on each request that i require authentication for. On Tuesday, May 28, 2013 6:01:11 AM UTC-7, Ruben D. Orduz wrote: > > Yes, most REST patterns I've see

[web2py] Re: how display var in menu

2013-05-28 Thread Niphlod
missed the "very detailed post". what does it mean that you want help with menu comprehension using a controller ? The menu can be defined wherever you want. Having it defined in models is just a shortcut to avoid having to redefine it over and over, because usually the menu is "fixed". That bei

[web2py] Re: jquery mobile: popup calendar does not always appear

2013-05-28 Thread Rowdy
On 28/05/2013 1:36 PM, Massimo Di Pierro wrote: please open a ticket. Perhaps it is time to upgrade the calendar. Thank you Massimo! Ticket 1511 created. https://code.google.com/p/web2py/issues/detail?id=1511 -- --- You received this message because you are subscribed to the Google Groups

[web2py] Re: how display var in menu

2013-05-28 Thread greaneym
I posted a very detailed explanation of my progress so far and what I needed further. I can see it in the web2py-group posting but maybe you cannot see it? I need further help with menu comprehension using a controller instead of a model file. I can post again if you can't see the request. than

[web2py] Re: Support for internationalization in web2py wiki

2013-05-28 Thread Massimo Di Pierro
There is not. The problem is that normal internationalization libraries are not appropriate for wiki pages. I would recommended using different pages for different languages. In your opinion, how should internationalization for wiki pages work? On Tuesday, 28 May 2013 14:35:21 UTC-5, Daniel Gon

[web2py] Re: how display var in menu

2013-05-28 Thread Niphlod
On Tuesday, May 28, 2013 10:15:24 PM UTC+2, greaneym wrote: > > Thanks that was helpful and got me further but I need a bit more help. > > > on what ? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and st

[web2py] Re: Preventing repeated submissions, or rate limiting submissions

2013-05-28 Thread Derek
I'd agree with that approach. I write interfaces where we can have bursts of 100 messages a minute, and if I took all those requests and pushed them to the database, then the interactive users would experience delays. So, what I do is have a mandatory pause of 15 seconds between messages. So if

[web2py] Re: how display var in menu

2013-05-28 Thread greaneym
Thanks that was helpful and got me further but I need a bit more help. I want to have a menu item that shows the current total value of a > calculation, > as well as a sparkline chart showing the values of a time series. > > I read the twitter bootstrap docs to find out what I think I need is a

[web2py] Re: 2.4.7 problems

2013-05-28 Thread Niphlod
I tried with cache.disk and no error occurred. Are you positive that there are no permission issues on the cache folder ? -- --- 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, se

Re: [web2py] How to do One-to-Many form Submit on one page

2013-05-28 Thread Richard Vézina
You need to use ajax or try this approach : https://groups.google.com/forum/?fromgroups#!topic/web2py/FAvjWNUiC3Y Richard On Fri, May 24, 2013 at 11:08 AM, Lio wrote: > Hello everyone, > > I have a one-to-many relation submission problem. Using the example in > book ( > http://web2py.com/book

[web2py] Re: 2.4.7 problems

2013-05-28 Thread BlueShadow
> > >>> >>> I just changet it from cache.disk to cache.ram and it works but I would >>> prefer to put it on the disk and not to the ram. >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>>

[web2py] Re: Preventing repeated submissions, or rate limiting submissions

2013-05-28 Thread Niphlod
then just insert a time.sleep(1) after form.process().accepted rate limiting algos are a bit of a pain to implement correctly and there are always issues with concurrency, user identification, etc etc etc. On Tuesday, May 28, 2013 9:52:57 PM UTC+2, Chris Teodorski wrote: > > Just brute force pre

[web2py] Re: Preventing repeated submissions, or rate limiting submissions

2013-05-28 Thread Chris Teodorski
Just brute force prevention. This should always be a human submitting with no bursts. On Tuesday, 28 May 2013 15:46:33 UTC-4, Niphlod wrote: > > then the question should be are you in the search of a method that > enables users to submit 5 forms in 1 second but NOT 6 forms in 5 seconds >

[web2py] Re: Preventing repeated submissions, or rate limiting submissions

2013-05-28 Thread Niphlod
then the question should be are you in the search of a method that enables users to submit 5 forms in 1 second but NOT 6 forms in 5 seconds (i.e. do you allow short bursts/peeks) or just something that prevents bruteforce and allows 1 submit in a second (pretty irrelevant waiting-time for a

[web2py] Re: Preventing repeated submissions, or rate limiting submissions

2013-05-28 Thread Chris Teodorski
On Tuesday, 28 May 2013 15:35:48 UTC-4, Niphlod wrote: > If your problem lies into the realm of "this form shouldn't be submitted > more than 5 times in 5 seconds" you can play a little bit with your > controller > That is exactly what my problem is, or what I'm trying to prevent. -- --

[web2py] Re: Preventing repeated submissions, or rate limiting submissions

2013-05-28 Thread Niphlod
there's no default protection for that, but web2py creates a token for each form to prevent double submission. The same system should prevent brute-force insertions (that is, multiple simultaneous submission from the same user). If your problem lies into the realm of "this form shouldn't be subm

[web2py] Support for internationalization in web2py wiki

2013-05-28 Thread Daniel Gonzalez
Hi, I have started to use the web2py wiki module, but can not find any support for internationalization of the wiki pages. What I would like is to be able to select the language based on some query parameters or some configuration parameters. Of course, the pages must be already be saved in the

[web2py] Re: Object reuse in DB connection pools.

2013-05-28 Thread Massimo Di Pierro
Web2py closes the transaction and stores the connection object. Nothing is cleared out. Should it be? To my knowledge there is nothing specific the developers should do before the connection is returned to the pool. It is possible that I am missing something here... On Tuesday, 28 May 2013 13:2

[web2py] Preventing repeated submissions, or rate limiting submissions

2013-05-28 Thread Chris Teodorski
Aside from a Captcha (I'd rather not go that route, but may have to), is there a way to limit the number of times a user can submit a form in a certain amount of time? This isn't a login, but I'd prefer to prevent someone from brute forcing the correct submission. Thanks for your ideas, Chr

[web2py] Object reuse in DB connection pools.

2013-05-28 Thread mldomm85717
Hello, I am a relatively new web2py user. I've read the on-line documentation and looked within this forum and cannot find my answer. I am wondering about database connection pools. What does web2py do when releasing a database connection back into the pool? What gets cleared out, if anythi

[web2py] auth.navbar

2013-05-28 Thread greenpoise
Enter {{try:}}{{=auth.navbar(action=URL (request .application,'default','user'))}}{{except:pass}} code here... I made a totally new template from scratch and I was just wondering, how can I

Re: [web2py] Re: Memory leak, SQLite, Windows (7, 2008)

2013-05-28 Thread Derek
Yea, of course in the real world you'd never use it that way, I've seen people baffled why the result set is returned out of order when they didn't specify an order. If there are multiple people using a database, sometimes the database may be in the middle of returning a resultset that is simil

Re: [web2py] Re: database shootout

2013-05-28 Thread Ricardo Cárdenas
Just got email from a PA developer saying they're hoping to have Postgres 9.2 out next month. Good news! On Tue, May 28, 2013 at 8:23 AM, Cliff Kachinske wrote: > They [PythonAnywhere] list Psycopg2 among the installed gadgets. This > will definitely push me in their direction. -- --- You

Re: [web2py] Re: deploy nginx debian6

2013-05-28 Thread Johann Spies
I never succeeded in getging nginx + wsgi to work properly on Debian. I went back to Apache and it is just working. The Ubuntu script is not suitable for Debian. Regards Johann On 28 May 2013 15:04, Fernando Vieira wrote: > I solved my problem with apache and wsgi, worked ok in debian! > > -

[web2py] Re: web2py components and browser history

2013-05-28 Thread Jay Martin
Thanks for the great detail. I'm curious if you were able to smooth out the flakiness you mentioned or have made any new discoveries since last year? Thanks! Jay On Saturday, January 21, 2012 6:30:58 AM UTC-5, LightDot wrote: > > It seems that nobody cares much for web2py, ajax and browser back

[web2py] Re: database shootout

2013-05-28 Thread Cliff Kachinske
They list Psycopg2 among the installed gadgets. This will definitely push me in their direction. On Monday, May 27, 2013 9:08:30 PM UTC-4, Monte Milanuk wrote: > > On 05/27/2013 09:29 AM, Ricardo C�rdenas wrote: > > > > PythonAnywhere is a terrific option; I'm a bit surprised they don't >

[web2py] Re: deploy nginx debian6

2013-05-28 Thread Fernando Vieira
I solved my problem with apache and wsgi, worked ok in debian! -- --- 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 mor

Re: [web2py] Restful authentication and CORS

2013-05-28 Thread Ruben D. Orduz
Yes, most REST patterns I've seen are handled either by http basic auth or else request signing. Either option requires handling that on each call. On Tue, May 28, 2013 at 4:54 AM, Michele Comitini < michele.comit...@gmail.com> wrote: > REST is stateless so you should not rely on session, hence

[web2py] Re: 2.4.7 problems

2013-05-28 Thread BlueShadow
deleting the cache directory has no effekt. any other ideas? On Tuesday, May 28, 2013 12:32:18 PM UTC+2, Niphlod wrote: > > cache.client was experimental. it was renamed to cache.action > > As for the second error, try to delete the cache/ directory > > Il giorno martedì 28 maggio 2013 11:58:35 U

[web2py] Re: 2.4.7 problems

2013-05-28 Thread Niphlod
cache.client was experimental. it was renamed to cache.action As for the second error, try to delete the cache/ directory Il giorno martedì 28 maggio 2013 11:58:35 UTC+2, BlueShadow ha scritto: > > Hi, > I updated to the newest version of web2py and I got at least to problems: > there is no clien

[web2py] 2.4.7 problems

2013-05-28 Thread BlueShadow
Hi, I updated to the newest version of web2py and I got at least to problems: there is no client cache funktion anymore. the second one: I get an error when I create a cached version of a page: @auth.requires_membership('VIP') @cache("Ertrag", time_expire=86400, cache_model=cache.disk) def Ertrag()

[web2py] Re: web2py 2.4.7 is Out

2013-05-28 Thread LightDot
I opened an issue to track this: http://code.google.com/p/web2py/issues/detail?id=1510 On Sunday, May 26, 2013 10:58:08 AM UTC+2, Niphlod wrote: > > in hg to delete a bookmark > > hg tag --remove > > > in git instead its > > git tag -d > git push origin :refs/tags/ > > > > PS: github doesn't hol

Re: [web2py] custom login_bare()

2013-05-28 Thread Michele Comitini
Could you post here a longer description or example of your authentication flows? we need more information to help you! :-) I think there is no need to modify Auth class or login_bare(). mic 2013/5/28 ctrlSoft > i want keep users in the same table (default auth), and i have 2 kind of > auth.

Re: [web2py] Restful authentication and CORS

2013-05-28 Thread Michele Comitini
REST is stateless so you should not rely on session, hence you can use auth.settings.allow_basic_login = True see here http://web2py.com/books/default/chapter/29/10#Access-Control for proper (as per RFC) authentication challenge with realm use: @auth.basich(basic_auth_real=) An alternative is

[web2py] custom login_bare()

2013-05-28 Thread ctrlSoft
i want keep users in the same table (default auth), and i have 2 kind of auth. 1 basic and second is oauth.(facebook) in basic auth i use standart authentification, but with oauth i want to verify users by email, name .. token once auth object password is required i decided for oauth do defi