[web2py] Jquery UI Datepicker

2016-06-07 Thread Winter Kryz
Hello everybody, I'm trying to change the appearance of the default datepicker on a form and I want to choose a theme from Jquery UI

[web2py] Re: Bug Web2py and MongoDb datetime and default="request.now".

2016-06-07 Thread Massimo Di Pierro
I opened a pydal ticket On Tuesday, 7 June 2016 05:51:05 UTC-5, arihant daga wrote: > > I think there is this bug in web2py. > > I had this in my code for users table. > > Field('created_on', 'datetime', > default=request.utcnow,update=request.utcnow) > > but on submitting signup form it

[web2py] How to update hidden fields on a smartgrid

2016-06-07 Thread João Matos
Hello, Does anyone know how to update hidden fields on a smartgrid? I have this table definition db.define_table('so', Field('code', 'string', label=T('Code')), # PHC Field('co_id', 'reference co', label=T('Client order'), writable=False,

[web2py] web2py and OpenShift

2016-06-07 Thread J Boggy
https://github.com/prelegalwonder/openshift_web2py I tried like this. How i can get latest version of web2py. or there is other ways to use web2py on openShif. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Re: Access the browser window.sessionStorage in my controller

2016-06-07 Thread Jim Steil
Thanks Anthony, that was what I expected. What I'm trying to accomplish is to be able to pass variables from page to page using the session variable in web2py. This doesn't work if you have more than one window/tab open in the same browser with each tab open to the same series of pages. -Jim

[web2py] Re: Access the browser window.sessionStorage in my controller

2016-06-07 Thread Anthony
Not exactly sure what you're asking. Of course, the server has no direct access to anything in the browser unless the browser sends it, so I suppose you could make an Ajax request to send whatever data you want to the server. Anthony On Tuesday, June 7, 2016 at 1:08:35 PM UTC-4, Jim S wrote: >

Re: [web2py] Re: multi component form loaded in the same page

2016-06-07 Thread Niphlod
for future lurkers of threads, posting the code, or even better a minimal app, it's not something Anthony (or the occasional helper) asks for his own amusement...that simple requirement forces your brain to reevaluate all the steps, in a clean environment. 50% of the cases, your brain was

[web2py] Re: Access the browser window.sessionStorage in my controller

2016-06-07 Thread Niphlod
the web is full of replies to your question tl;dr: sessionstorage is only valid in the current tab. to persist accross tabs, you need to leverage localstorage. On Tuesday, June 7, 2016 at 7:08:35 PM UTC+2, Jim S wrote: > > I'm not that well-versed in the workings of a browser. I'm wondering if

[web2py] Re: MySQL connection error after scheduled task completes

2016-06-07 Thread Niphlod
NP. perfectly kosher. For all matter and purposes, unless you need "transactional consistency" a separate db makes perfect sense. Those messages though indicate that the scheduler isn't finding the tables, or the tables have an incorrect structure. On Tuesday, June 7, 2016 at 7:08:41 PM UTC+2,

Re: [web2py] Re: multi component form loaded in the same page

2016-06-07 Thread Manuele Pesenti
Please forgive and forget! My fault! In the example I forgot to pass the name of the form as query string argument... the LOAD command would have to be this one: {{=LOAD(request.controler, "myform.load", args=(name,), ajax=True, targer="cmp-%s" % name)}} In this way everything works as

Re: [web2py] Re: multi component form loaded in the same page

2016-06-07 Thread Manuele Pesenti
Il 07/06/16 15:24, Anthony ha scritto: > Again, it might help to see more code. For example, are you calling > session.forget() at any point? What does the session look like at each > stage (i.e., as each form is created and as each is submitted)? It > sounds like the formkey for each form is not

[web2py] Re: Output format of an SQL query

2016-06-07 Thread Sammy
Thanks, Anthony, that was the problem! I assumed this was an integer (this is a 3rd party product), but looks like it is actually varchar when I checked after your latest query. Once I removed type as 'integer' it worked. I will let you know if I have any follow up questions. Thank you! --

[web2py] Re: Output format of an SQL query

2016-06-07 Thread Anthony
Is the ID field in your database an integer field? On Tuesday, June 7, 2016 at 1:51:55 PM UTC-4, Sammy wrote: > > Actually I did try using primarykey also, but the error is still the > same: invalid literal for long() with > base 10: '' > Any idea? > -- Resources: - http://web2py.com -

[web2py] Re: Output format of an SQL query

2016-06-07 Thread Sammy
Actually I did try using primarykey also, but the error is still the same: invalid literal for long() with base 10: '' Any idea? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Access the browser window.sessionStorage in my controller

2016-06-07 Thread Jim S
I'm not that well-versed in the workings of a browser. I'm wondering if anyone knows how I could, in my controller, access the window.sessionStorage key/value pairs set in my browser tab. What I'm trying to do is to be able to pass objects from one web page to another. This works fine until

[web2py] Re: MySQL connection error after scheduled task completes

2016-06-07 Thread Andre Kozaczka
Ah bummer! Thank you for looking into this for me. Through PythonAnywhere, I've added a Postgres database. I'm not sure if I will migrate everything from MySQL to Postgres but I was thinking of just starting off with the scheduler. I created a second DAL for the Postgres and initialized the

[web2py] Re: How do I change the admin such that it doesn't redirect to welcome by default but to some other app?

2016-06-07 Thread Anthony
What do you mean? The admin app doesn't redirect. If you want to specify a default application (i.e., when no application is specified in the URL), note that web2py first looks for an app called "init" and then for "welcome". If you don't want to name your app "init", you can also specify a

[web2py] Re: How to edit the menu bar so as to remove profile and name in front of welcome in the dropdown?

2016-06-07 Thread Anthony
On Tuesday, June 7, 2016 at 11:37:47 AM UTC-4, Ron Chatterjee wrote: > > If the user is logged in, how would I change the "profile" word to > "registration page" or "registration info". > I understand if you don't want to use the label "Profile", but "Registration" is probably going to be a

[web2py] Re: Output format of an SQL query

2016-06-07 Thread Anthony
On Tuesday, June 7, 2016 at 11:36:43 AM UTC-4, Sammy wrote: > > Thanks for your responses. I certainly want to take advantage of > SQLFORM.grid etc. and I don't mind defining tables. However, I am getting > errors. > > Initially, I was getting the error previously mentioned, i.e.

[web2py] How do I change the admin such that it doesn't redirect to welcome by default but to some other app?

2016-06-07 Thread Steve Joe
How do I change the admin such that it doesn't redirect to welcome by default but to some other app? -- 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: How to properly set cache.action parameters in order to have different cache for logged-in and not?

2016-06-07 Thread Lisandro
After reconsidering the whole thing, I've found a way to achieve what I wanted, without having to change too much code. Considering that I needed to keep client-side caching, the only way to go was redirecting the user to a "different URL". So I used a lazy argument: when the user logs in, he

[web2py] Re: How to edit the menu bar so as to remove profile and name in front of welcome in the dropdown?

2016-06-07 Thread Ron Chatterjee
If the user is logged in, how would I change the "profile" word to "registration page" or "registration info". Which is (to me) more in line with how I see the info. On Monday, June 6, 2016 at 9:59:12 PM UTC-4, Anthony wrote: > > On Monday, June 6, 2016 at 2:45:00 PM UTC-4, Ron Chatterjee

[web2py] Re: Output format of an SQL query

2016-06-07 Thread Sammy
Thanks for your responses. I certainly want to take advantage of SQLFORM.grid etc. and I don't mind defining tables. However, I am getting errors. Initially, I was getting the error previously mentioned, i.e. ORA-00904: "Table1"."ID": invalid identifier. Using the link for legacy DB

[web2py] Update grid by Ajax callback

2016-06-07 Thread Gael Princivalle
Hello. I would like to update a grid using an Ajax callback like: {{=A('click me', callback=URL('myaction'), target="t")}} {{=grid}} Is it possible ? If yes how can I build the myaction function ? def myaction(): grid = SQLFORM.grid(db.auth_user) ??? return grid Thanks. --

Re: [web2py] Re: multi component form loaded in the same page

2016-06-07 Thread Anthony
Again, it might help to see more code. For example, are you calling session.forget() at any point? What does the session look like at each stage (i.e., as each form is created and as each is submitted)? It sounds like the formkey for each form is not in the session, but not clear why. Anthony

[web2py] Re: Weird form issue

2016-06-07 Thread Jeff Riley
Mark. Could you contact me at javajeff...@gmail.com. I would like to see if you could help me finish this out and what that might cost. On Monday, June 6, 2016 at 5:10:37 PM UTC-5, Mark Graves wrote: > > Hey Jeff, > > Most likely the date/time format. > > If you can post a sample sqlite file

[web2py] Re: Modification in version 2.14.6 not documented ?

2016-06-07 Thread Leonel Câmara
I did this to fix an issue where some of the grid options were not being passed by smartgrid, I'm sorry I'll see about fixing it. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: ajax return multiple javascript one at a time

2016-06-07 Thread Anthony
Note that there is no guarantee that the server will execute and return those Ajax requests in order. Also, if you want them to be processed in parallel on the server and you don't need the session for these calls, you should call session.forget(response) at the beginning of each call, as that

[web2py] Re: The built-in web2py wiki error

2016-06-07 Thread Mirek Zvolský
It really looks like this is broken with some new commit. In 2.14.5 I have - gluon/tools.py 6476-6478 gid = group.id if group else db.auth_group.insert( role='wiki_editor') auth.add_membership(gid) In trunk (and probably 2.14.6) - gluon/tools.py 6506-6510

[web2py] Re: ajax return multiple javascript one at a time

2016-06-07 Thread Paolo Amboni
Ok, debugged in the js console. They do fire up, but thanks to your suggestion i did find that the problem was in the response from the web2py function. Now all works fine. If only we could use python instead of javascrit... :-) Il giorno domenica 5 giugno 2016 14:38:57 UTC+2, Anthony ha

[web2py] Re: Is there a way to make scheduler tasks be picked by workers up even quicker?

2016-06-07 Thread Niphlod
it may look like but that timeline doesn't emit the log according to the scheduler process seeing records (the DEBUG should output "looping..." and/or "sleeping..." at each iteration). Until I see it I can just ask direciton about how to replicate the issue, which I can't do. On Tuesday, June

[web2py] Re: MySQL connection error after scheduled task completes

2016-06-07 Thread Niphlod
uhm, then it'll be quite impossible to fix it given the timeout is seemingly random. On Tuesday, June 7, 2016 at 1:19:07 PM UTC+2, Andre Kozaczka wrote: > > Yes, same lines. > > On Tuesday, June 7, 2016 at 5:54:37 AM UTC-4, Niphlod wrote: >> >> is the exception raised in the same lines ? >> >>

Re: [web2py] Re: multi component form loaded in the same page

2016-06-07 Thread Manuele Pesenti
Il 07/06/16 13:07, Anthony ha scritto: > We may need to see more code. Do all the forms load on the page? If > so, what happens in the browser network tab when you submit one of > them? If the Ajax calls are being made properly, what happens on the > server in the controller (i.e., where in the

[web2py] Re: MySQL connection error after scheduled task completes

2016-06-07 Thread Andre Kozaczka
Yes, same lines. On Tuesday, June 7, 2016 at 5:54:37 AM UTC-4, Niphlod wrote: > > is the exception raised in the same lines ? > > On Tuesday, June 7, 2016 at 4:32:45 AM UTC+2, Andre Kozaczka wrote: >> >> >> Well. adding "sync_output=200" ended up working for tasks that were >> just over

[web2py] Re: multi component form loaded in the same page

2016-06-07 Thread Anthony
We may need to see more code. Do all the forms load on the page? If so, what happens in the browser network tab when you submit one of them? If the Ajax calls are being made properly, what happens on the server in the controller (i.e., where in the code does it fail, and what does the session

[web2py] Re: Is there a way to make scheduler tasks be picked by workers up even quicker?

2016-06-07 Thread Anthony
> > So i really don't think there can be "several heartbeats before new tasks > are actually assigned"... > I was just looking at this timeline -- once the task has been queued, looks like it takes three heartbeats to be assigned: 2016-06-02 01:33:00,657 - DEBUG - Adding task to scheduler

[web2py] Bug Web2py and MongoDb datetime and default="request.now".

2016-06-07 Thread arihant daga
I think there is this bug in web2py. I had this in my code for users table. Field('created_on', 'datetime', default=request.utcnow,update=request.utcnow) but on submitting signup form it always threw an error saying combine() argument 1 must be datetime.date, not str i checked arguments and

[web2py] Re: Is there a way to make scheduler tasks be picked by workers up even quicker?

2016-06-07 Thread Niphlod
maybe the unclear point is that "checking for new tasks and assigning" are on a totally separate "channel" from executing them... if you have multiple workers that are totally free, as soon as tasks are reassigned by the ticker they will be picked up. If you are on a single worker, that is a

Re: [web2py] How do I host my web2py app on openshift?

2016-06-07 Thread Manuele Pesenti
Il 07/06/16 09:28, Steve Joe ha scritto: > any stepwise procedure? Just look here: http://stackoverflow.com/questions/19215201/how-do-you-get-an-existing-web2py-app-deployed-on-openshift I've done it only once and I can't remember now how :) but I remember it was very easy. M. --

[web2py] Re: MySQL connection error after scheduled task completes

2016-06-07 Thread Niphlod
is the exception raised in the same lines ? On Tuesday, June 7, 2016 at 4:32:45 AM UTC+2, Andre Kozaczka wrote: > > > Well. adding "sync_output=200" ended up working for tasks that were > just over the 300 second mark (where previously I was failing). I changed > the task length to 600

[web2py] multi component form loaded in the same page

2016-06-07 Thread Manuele Pesenti
Hi guys! What's the right way to use multiple components in a page that poit to different forms? It seams I have a problem with the _formkey... I tyied this way: * in the component controller that is called many times I have defined: def _iface(): iface = request.args(0) ...

Re: [web2py] Any body here used pythonanywhere? Question for you.

2016-06-07 Thread Philip Kilner
Hi Steve, On 07/06/16 08:32, Steve Joe wrote: Apart from 'welcome' how many web apps can you hostel to a domain name say, mystyle.com, at max? I'm reading your question as relating to limits imposed by PA, as opposed to resources - is that right? Web2py counts as a single web app to PA,

[web2py] Any body here used pythonanywhere? Question for you.

2016-06-07 Thread Steve Joe
Apart from 'welcome' how many web apps can you hostel to a domain name say, mystyle.com, at max? -- 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] How do I host my web2py app on openshift?

2016-06-07 Thread Steve Joe
any stepwise procedure? -- 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