[web2py] Re: creating background process with multiprocessing spawns new instance of web2py

2010-05-20 Thread Candid
Here is how I did it: #in controller action import subprocess subprocess.Popen(r"python applications/{0}/modules/ run.py".format(request.application), shell=True) On May 19, 6:41 pm, amoygard wrote: > Thanks for the answer - I was aware that I don't have to do this to > handle ajax requests in g

[web2py] Re: Ajax style calls blocking

2010-05-24 Thread Candid
I might be completely wrong, but I think the problem is that web2py locks the session file while executing controller's actions, so two simultaneous requests within the same session are processed one by one sequentially. On May 24, 8:37 am, eddie wrote: > I have found this recent thread: > > http

[web2py] Re: A basic problem about threading and time consuming function...

2010-05-25 Thread Candid
Well, actually there is a way for the server to trigger an action in the browser. It's called comet. Of course under the hood it's implemented on top of http, so it's browser who initiates request, but from the developer perspective it looks like there is dual channel connection between the browser

[web2py] Re: web2py Database issues

2010-05-26 Thread Candid
On your second question, you should use alternate notation: db.define_table("location_unit)",       SQLField("name", "string", notnull=True),       SQLField("parentLocation", "reference location_unit"),       ) See http://web2py.com/book/default/section/6/13 for details. As for your first qu

[web2py] Re: drop down values according to condition

2010-05-27 Thread Candid
db.ticket.type.requires = IS_IN_DB(db(db.type.deleted == False), 'type.id', '%(name)s')) On May 27, 3:25 am, Neveen Adel wrote: > Hello, > > i have table > > db.define_table("type", >       SQLField("name", "string"), >       SQLField("deleted", "boolean",default=False), >   ) > > and > > db.defi

[web2py] Re: Group some fields into a

2010-05-27 Thread Candid
Use form.custom.widget. See http://web2py.com/book/default/section/7/7 for details. On May 27, 4:48 pm, Mathieu Clabaut wrote: > Hello > In my model, I've a table defined as > > STATUS_TYPE = ('identification','analyse') > > db.define_table('faq', >     Field('status', 'string', requires=[IS_IN_S

[web2py] Re: Question on IS_IN_DB and sort order

2010-05-28 Thread Candid
db.your_table.your_field.requires = IS_IN_DB(db, 'person.id', '% (name)s', orderby='person.name')) On May 28, 9:38 am, David Marko wrote: > Is there a way, how to specify order(sorting) in IS_IN_DB ? Its easy > to use it for validator and let web2py to generate combobox. How can I > specifiy 'ord

[web2py] Re: calling a fuction from javascript (jquery)

2010-06-01 Thread Candid
For your example it's easier to use $.post: $.post("your_url", {naotext: naotext}) In NaoSpeak function on the server you can access naotext as request.vars.naotext On Jun 1, 12:17 pm, pk wrote: > thanks, > have you an example? > > On 1 Jun., 18:11, Thadeus Burgess wrote: > > > > > Add the var

[web2py] Re: Outer join problem

2010-06-04 Thread Candid
typo: belongs, not belngs On Jun 4, 11:49 am, ceriox wrote: > it don't work > AttributeError: 'Field' object has no attribute 'belngs' > > mdipierro i write you an email with the real full db > > On 4 Giu, 15:40, mdipierro wrote: > > > > > I think you want this, all Books without a union. > > >

[web2py] Re: Generating Forms

2010-06-21 Thread Candid
form=SQLFORM(...,formstyle='divs') http://groups.google.com/group/web2py/msg/9823ffc7410fd3e4 On Jun 19, 7:18 pm, Binh wrote: > Hi, > > Is there any way to generate the auth form and general SQLForms with a > div wrapping instead of the default table wrapping without hacking the > form generator

[web2py] web2py freezing

2010-06-30 Thread Candid
I am using web2py in my organization for internal applications. One of the applications uses dedicated instance of web2py (v1.78.1) running on dedicated ubuntu server. It connects to our SQL Server 2005 database via freetds. It runs with the following parameters: python web2py.py -i ... -p ... -a

[web2py] Re: web2py freezing

2010-07-01 Thread Candid
too many connections? > > On 30 Giu, 16:06, Candid wrote: > > > > > I am using web2py in my organization for internal applications. One of > > the applications uses dedicated instance of web2py (v1.78.1) running > > on dedicated ubuntu server. It connects to our SQL

[web2py] Re: web2py freezing

2010-07-01 Thread Candid
b server itself is fine. We have many other systems relying on this server and they work fine. On Jul 1, 12:13 pm, Candid wrote: > I will check memory usage next time it freezes but I am pretty sure > it's OK. > What do you mean by db log? > > Also, am I missing something or rock

[web2py] Re: Filtered search of db by dropdown selection

2010-07-01 Thread Candid
model: db = DAL('sqlite://storage.sqlite') db.define_table('thing', Field('category'), Field('year', 'integer')) db.thing.category.requires = IS_IN_SET(['a', 'b', 'c']) db.thing.year.requires = IS_IN_SET([2000, 2001, 2002]) controller: def index(): form = SQLFORM.factory(db.thing) if f

[web2py] Re: web2py freezing

2010-07-02 Thread Candid
> Every now and again there is a "BUG: unable to handle kernel paging > request at virtual address b79b3000", always in the web2py Python > process, and web2py more or less hangs. Where do you see this error message? On Jul 2, 4:52 am, Rowdy wrote: > Candid wrote: >

[web2py] Re: web2py freezing

2010-07-02 Thread Candid
all those 20 seconds and returns without any errors. Am I misunderstanding the timeout option? On Jul 1, 12:13 pm, Candid wrote: > I will check memory usage next time it freezes but I am pretty sure > it's OK. > What do you mean by db log? > > Also, am I missing someth

[web2py] Re: Will rocket close connections if it takes long time?

2010-07-07 Thread Candid
latest trunk, running > > > > > Windows XP, my maintenance request did last for more than 10 seconds, > > > > > magically. Does it indicate the DoS-resistant timeout fuse somehow > > > > > fail? Do you think it is ok or unacceptable? &g

[web2py] Re: StackExchange

2010-02-19 Thread Candid
Why not use stackoverflow.com with #web2py tag? On Feb 19, 1:23 am, Anand Vaidya wrote: > Looks nice. Costs atleast $129 per month > > Regards > Anand > > On Feb 19, 1:02 pm, minh wrote: > > > Just throwing this out there... > > > I think StackExchange.com would make a good platform for web2py h

[web2py] Re: Ajax Long Pooling (comet)

2010-08-25 Thread Candid
My recipe: - Run the resource extensive function in a separate process. - Use dedicated comet server for progress bar notifications. I highly recommend Orbited. On Aug 25, 11:21 am, Phyo Arkar wrote: > Hello Web2py > > I am running the resource extensive function , which is extracting > every ar

[web2py:30731] Re: upgrading to 1.66.1 chokes on sqlite database

2009-09-11 Thread Candid
Hello. I am using 1.66.2 (SVN revision 1178) and still getting "Permission denied" error occasionally: Traceback (most recent call last): File "C:\web2py\gluon\main.py", line 412, in wsgibasesession._try_store_on_disk(request, response) File "C:\web2py\gluon\globals.py", line 366, in _try_

[web2py] Re: Orbited with web2py

2010-11-29 Thread Candid
I use orbited in one of my company's in-house web2py applications. It works great. I did not have to integrate it with web2py though - I use it as a completely independent message broker. There are some python scripts that run in background and process some stuff and send notifications to browser t