Re: [web2py] Re: date widget broken in trunk?

2011-12-04 Thread Angelo Compagnucci
Yes it's fixed and the new skin is really slick! Great Massimo! 2011/12/4 Massimo Di Pierro : > I believe this is now fixed. Please check it. > > > On Dec 3, 5:04 pm, Angelo Compagnucci > wrote: >> Yes, I can confirm there is a bug. >> >> With this model: >> >> db.define_table('testdb',Field('te

Re: [web2py] Re: Pass multiple arguments to URL through javascript

2011-12-04 Thread Jonathan Lundell
On Dec 3, 2011, at 11:32 PM, Vineet wrote: > @Anthony, thanks. Your method worked. > Secondly, if I want to pass arguments by name, would it be okay to do > something like this>> > > {{=URL(...)}} + '/' + 'p1=' + param1 + '/' + 'p2=' + param2 Almost. You want: {{=URL(...)}} + '?p1=' + para

[web2py] Is this a in custom imports?

2011-12-04 Thread Constantine Vasil
I managed to transfer a very big app initially developed for Django+GAE+JQuery Mobile to web2py. Managed to set up my Eclipse environment to work with web2py and now I can debug my web2py + GAE hybrid app. Works excellent. The issues I see is because my app is big it runs slower than on my former

[web2py] Re: How to make a simple upload form with just one field - a file name?

2011-12-04 Thread Constantine Vasil
Thank you, it was GAE specific.

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-04 Thread Constantine Vasil
The login is here: /user/login auth.settings.login_next = URL('default', args='index') I expect the address bar after redirection to show in routes.py routers = dict( BASE = dict( default_application = 'my_dev', default_controller='default' ), ) routes_in = (

Re: [web2py] Re: web2py hosting

2011-12-04 Thread Martin Weissenboeck
Ok, I have installed web2py on pythonanywhere and myname.pythonanywhere.comis running. But I need *https*://myname.pythonanywhere.com for the "Administrative interface". It is not possible to use https. Any ideas? Regards, Martin 2011/10/13 GoldenTiger > I posted in http://web2py.pythonanywher

[web2py] Re: Expire date for Web2Py applications

2011-12-04 Thread Shiv
Thanks Anthony, Let me try this and update you. Best Regards Shiv

[web2py] Re: RESTful API error: "no matching pattern"

2011-12-04 Thread Oliver Lade
Hi Massimo, Yep, I tried all the combinations. When I set patterns to "auto" and go to http://127.0.0.1/myapp/default/api/patterns, no "all" pattern even appears. In my simple case, I have a single table called "task" with two fields: name and description. A pattern of "auto" generates two expres

[web2py] Re: Requesting Feedback for Web2py Instant Admin

2011-12-04 Thread Joseph Jude
is there any progress in including it in admin? I couldn't download the compiled plugin but downloaded and from the excellent docs, was able to include into my app. But making it part of admin will be great. Joseph

Re: [web2py] Re: One Queue

2011-12-04 Thread Martin Weissenboeck
Hi Alan, I have tried to decorate two functions. But it notwork as I expected. Name of the application: queuetest, controller: default.py: from Queue import * @service.run def pp(): # Producer q.put(request.now.isoformat()) return dict(size=q.qsize()) @service.run def cc(): # Consume

Re: [web2py] Re: SQLFORM grid

2011-12-04 Thread Johann Spies
On 2 December 2011 19:36, Anthony wrote: > Please submit an issue: http://code.google.com/p/web2py/issues/list > > > On Friday, December 2, 2011 11:35:01 AM UTC-5, peter wrote: >> >> I have discovered that the error only occurs when one is editing records >> that are returned from a query > > Ma

Re: [web2py] Problem understanding imports

2011-12-04 Thread atte
I had same problem and I found out that it worked fine with source code version (1.99.2) of the web2py. That's why with compiled version (1.99.2) I copied the gluon directory from the library.zip to root and that solved the problem. I'm new to web2py so could somebody explain what is the actual

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-04 Thread Anthony
Not sure it has anything to do with your problem, but you cannot mix the parameter based and pattern based rewrite systems -- if you're using routers, you cannot also use routes_in/routes_out (I think the presences of routers will cause routes_in/routes_out to be ignored). Regarding the address

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-04 Thread Anthony
Note, you might consider asking about this in the jQuery Mobile forum: http://forum.jquery.com/jquery-mobile On Sunday, December 4, 2011 8:42:34 AM UTC-5, Anthony wrote: > > Not sure it has anything to do with your problem, but you cannot mix the > parameter based and pattern based rewrite syste

[web2py] Re: Converting mongodb collection to row

2011-12-04 Thread Alan Etkin
But what if you pass the default return value of dict.get? Does the function raise exceptions? i.e. Result.get("my_field", None) And you could catch invalid returned object exceptions with try-except blocks, and replacing them with a default value (i.e. None) This is what i understood so far: p

[web2py] Re: Converting mongodb collection to row

2011-12-04 Thread Alan Etkin
Sorry for the repeated posts: There is a a couple of mistakes in the last message. > parse() DAL.BaseAdapter (wich is called by dal's instance .select() parse() in called by the adapter instance > method) receives a rows argument (suposedly a dict returned > by ._select()?) and a colnames (a l

[web2py] Re: Post-login redirection issues

2011-12-04 Thread Yarin
Great- thanks for the update. I submitted a ticket about the session behavior. On Dec 2, 4:29 pm, Anthony wrote: > > On Friday, December 2, 2011 12:09:25 AM UTC-5, Yarin wrote: > > >> I think the duality of this behavior is confusing and inconsistent: > >> a) It would make more sense for all pos

[web2py] Re: Pass multiple arguments to URL through javascript

2011-12-04 Thread Massimo Di Pierro
what's wrong with? {{=URL(...,vars=dict(p1=param1,p2=param2))}} On Dec 4, 2:14 am, Jonathan Lundell wrote: > On Dec 3, 2011, at 11:32 PM, Vineet wrote: > > > @Anthony, thanks. Your method worked. > > Secondly, if I want to pass arguments by name, would it be okay to do > > something like this--

[web2py] Re: Pass multiple arguments to URL through javascript

2011-12-04 Thread Massimo Di Pierro
Ignore my comment... I missed the context. On Dec 4, 12:33 pm, Massimo Di Pierro wrote: > what's wrong with? > > {{=URL(...,vars=dict(p1=param1,p2=param2))}} > > On Dec 4, 2:14 am, Jonathan Lundell wrote: > > > > > > > > > On Dec 3, 2011, at 11:32 PM, Vineet wrote: > > > > @Anthony, thanks. Your

[web2py] Re: Is this a in custom imports?

2011-12-04 Thread Massimo Di Pierro
Sorry. I do not understand the problem. :-( On Dec 4, 2:19 am, Constantine Vasil wrote: > I managed to transfer a very big app initially developed for > Django+GAE+JQuery Mobile to web2py. Managed to set > up my Eclipse environment to work with web2py and now > I can debug my web2py + GAE hybrid

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-04 Thread Constantine Vasil
I understand that now about not mixing routing. OK I am using routes.example.py default_application = 'my_app'# ordinarily set in base routes.py default_controller = 'default' # ordinarily set in app-specific routes.py default_function = 'index' # ordinarily set in app-specific

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-12-04 Thread Pepe Araya
Hi Massimo and all the team! First all: Thanks very much for this feature!I it's really amazing! I have a question: It's possible to call a function after *update* or *edit* that take the id of the record created or updated? (or any other parameter) thanks very much! pepe.

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-12-04 Thread Massimo Di Pierro
yes. SQLFORM.grid(,oncreate=lambda form: do_something_with(form)) SQLFORM.grid(,onupdate=lambda form: do_something_with(form)) the record id is in form.vars.id On Dec 4, 1:22 pm, Pepe Araya wrote: > Hi Massimo and all the team! > > First all: Thanks very much for this feature!I it's r

Re: [web2py] Re: Expire date for Web2Py applications

2011-12-04 Thread António Ramos
Better yet Imagine i have 10 apps running in 1 web2py server. Then one user detects a big bug in one of the apps. What do i do? Stop the web2py server? what about the other 9 apps runnig ok? Imagine that the programmer is on vacations. Their coworkers cannot correct the bug and cannot shutdown the

[web2py] Re: One Queue

2011-12-04 Thread Alan Etkin
It seems that you are resetting the q object (because controller code executes on each request) It could be solved storing the object in session. session.q = ... (session supports only pickleable objects) On 4 dic, 07:40, Martin Weissenboeck wrote: > Hi Alan, > > I have tried to decorate two fu

[web2py] Re: One Queue

2011-12-04 Thread Anthony
On Sunday, December 4, 2011 4:28:19 PM UTC-5, Alan Etkin wrote: > > It seems that you are resetting the q object (because controller code > executes on each request) > It could be solved storing the object in session. > > session.q = ... > Note, the session is unique per user, so that only works if

Re: [web2py] Re: Expire date for Web2Py applications

2011-12-04 Thread Anthony
On Sunday, December 4, 2011 4:12:03 PM UTC-5, Ramos wrote: > > What about an On/OFF button in admin to disable individualy every app( or > all) redirecting automaticly the user the a default page. Without the need > of the programmer. > Actually, that's in trunk now (a disable/enable button for

[web2py] Re: Is this a in custom imports?

2011-12-04 Thread Constantine Vasil
Hi Massimo, I will try to explain better, posting the annotated code below. I want to define the *auth_user* in a module and configure it as: == Configuration == db.auth_

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-12-04 Thread Pepe Araya
Thanks! Massimo, I noticed that this line of *gluon/sqlhtml.py* 1754: message = error or T('%(nrows)s records found') % dict(nrows=nrows) add a new entry in the language file for every different search result. ("1 records found", "2 records found" ) I think that %(nrows)s should be outsid

[web2py] Re: Pass multiple arguments to URL through javascript

2011-12-04 Thread Brian M
Vineet, My copy of jQuery.query.js is attached - I'm assuming since it's released under the WTFPL the author won't mind :D You may also want to look at these: http://stackoverflow.com/questions/2053157/how-to-use-jquery-to-manipulate-the-querystring http://stackoverflow.com/questions/4344405/jqu

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-12-04 Thread Massimo Di Pierro
It odes not work that way. It will translate the string before the substitution: > python web2py.py -S welcome -M -N >>> T.force('it') >>> import os >>> print os.path.getsize('applications/welcome/languages/it.py') 4833 >>> T('%(test)s') % dict(test=1) '1' >>> print os.path.getsize('applications/w

[web2py] date and sum

2011-12-04 Thread Rick
Hi, I've a stack of records where records with the same date has different values, eg: record.date[0] = 2011-12-01 record.value[0] = 10 record.date[1] = 2011-12-01 record.value[1] = 20 record.date[3] = 2011-12-02 record.value[3] = 10 And now I want to summarize the values that are recorded for resp

[web2py] Re: date and sum

2011-12-04 Thread Massimo Di Pierro
rows = db(...).select(db.table.date,db.table.value.sum(),groupby=db.table.date) for row in rows: print row.table.date, row(db.table.value.sum()) mind that 'date' and 'value' are not good field names. Will work with sqlite but will break with other engines. On Dec 4, 8:00 pm, Rick wrote: > Hi,

[web2py] Re: date and sum

2011-12-04 Thread Rick
I tried to apply the solution to my code, but it still doesn't work. Here is the code: prerecords = db().select(db.day.ALL, orderby=db.day.thedate)for prerecord in prerecords:if prerecord.theauth==auth.user_id: if session.adate==prerecord.thedate:

[web2py] websocket for python

2011-12-04 Thread Red Arrow
article http://gehrcke.de/2011/10/python-websocket-server-powered-by-gevent-and-ws4py/ https://github.com/Lawouach/WebSocket-for-Python

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-04 Thread Constantine Vasil
For the record - this was only an issue for IE desktop. I had to switch off ajax in jQuery and now it works. That means I have to make two different templates - one for IE, and one for everything else. Does web2py has a function to recognize if the browser is any IE browser?

[web2py] Re: date and sum

2011-12-04 Thread Massimo Di Pierro
please resend indented better... On Dec 4, 8:33 pm, Rick wrote: > I tried to apply the solution to my code, but it still doesn't work. > Here is the code: > >         prerecords = db().select(db.day.ALL, orderby=db.day.thedate)    for > prerecord in prerecords:                if prerecord.theauth

[web2py] Re: web2py for dummies

2011-12-04 Thread mikech
I've been thinking along these same lines. I would like to see a workbook to go along with the web2py book in which the concepts in the book are illustrated in a sample in the workbook. Perhaps it could be a progressive sample that builds on one of the samples begun in the earlier chapters. M

Re: [web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-04 Thread Johann Spies
On 5 December 2011 05:55, Constantine Vasil wrote: > For the record - this was only an issue for IE desktop. I had to switch > off ajax in jQuery and now it works. > > That means I have to make two different templates - one for IE, and one > for everything else. > > Does web2py has a function to