[web2py] Re: web2py 2.0 almost done

2012-08-08 Thread pbreit
Seems to me a workflow engine should be an add-on of some sort. Does any other framework include something similar? --

[web2py] Re: web2py 2.0 almost done

2012-08-08 Thread Andrew
I guess Ross People's worflow process engine didn't make it in to 2.0 ? On Thursday, August 9, 2012 5:29:58 PM UTC+12, Andrew wrote: > > Just a note on IE7 navbar behaviour: > > The Menu has taken a turn for the worse: > Initially the Welcome App Sub Menus dissapeared in : "welcome css pathc, >

[web2py] Re: Legacy table without primary key?

2012-08-08 Thread pbreit
OK, I think I may have found the answer. The legacy definition is: CREATE TABLE `users_to_landlords` ( `user_id` smallint(6) NOT NULL DEFAULT '0', `landlord_id` smallint(6) NOT NULL DEFAULT '0', `prop_id` smallint(8) NOT NULL DEFAULT '0', PRIMARY KEY (`user_id`,`landlord_id`,`prop_id`) )

Re: [web2py] Re: web2py on appfog

2012-08-08 Thread Mandar Vaze
I have been using pythonanywhere last few days (Free account for testing purposes) Deployment is easy - They have a big "deploy web2py app" button :) They give you access to bash/mysql console via browser - Very nice. Paid accounts get native ssh access too. Their response time for support querie

Re: [web2py] Re: How to keep database connection alive ?

2012-08-08 Thread Amit
This is also not working giving same error: "ProgrammingError: Cannot operate on a closed database." :( Regards, Amit On Thu, Aug 9, 2012 at 9:58 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > This definitively would not work... > > how about > > @sched.interval_schedule(**seconds=

Re: [web2py] Re: SQLFORM.grid, checkboxes and mor than one page

2012-08-08 Thread Martin Weissenboeck
Ok, I will try it. Thank you! 2012/8/9 Massimo Di Pierro > You need custom JS that when you select a checkbox calls a controller > action via ajax and registers the id of the row in a session.mylist. > > > > On Wednesday, 8 August 2012 16:37:54 UTC-5, mweissen wrote: >> >> I have a SQLFORM.grid

[web2py] Re: Set a cookie and raise a 403/404

2012-08-08 Thread Massimo Di Pierro
Please open a bug report. On Wednesday, 8 August 2012 22:46:07 UTC-5, Yarin wrote: > > Is it possible to set a cookie on a response that returns a 403/404? > > def bad_access(): > > # Set a cookie > response.cookies['SOME_COOKIE'] = datetime.now() > response.cookies['SOME

Re: [web2py] Re: How to keep database connection alive ?

2012-08-08 Thread Massimo Di Pierro
This definitively would not work... how about @sched.interval_schedule(seconds=15) def purge_appliance_tbl(): yesterday = request.now - datetime.timedelta(days=1) db(db.appliance_tbl.created_on < yesterday).delete() db.commit() On Wednesday, 8 August 2012 22:24:40 UTC-5, Amit wrote

[web2py] Re: Cookie chaos- please see this example

2012-08-08 Thread Massimo Di Pierro
if we default path = '/' then all apps share cookies and that may be a problem. expiration is also not set. They are Cookies.SimpleCookie() objects. On Wednesday, 8 August 2012 22:14:25 UTC-5, Yarin wrote: > > Got it- added the path and everything's working now. > > I was not aware cookies are

[web2py] Legacy table without primary key?

2012-08-08 Thread pbreit
Is there any way to handle a legacy table that does not have a primary key? --

[web2py] LinkedIn not working? - Am I importing the wrong library?

2012-08-08 Thread Alec Taylor
Just trying to test out LinkedIn login, but having some trouble. I've tried placing https://github.com/michaelhelmick/linkedin/blob/master/linkedin.py in web2py\gluon\contrib\login_methods, but I still was getting the "linkedin module not found" error. Same error was received after a `pip insta

[web2py] Re: Foreign Key fields as null?

2012-08-08 Thread Mandar Vaze
I too am getting similar error (am using sqlform.grid, not smartgrid) I've posted a query here : https://groups.google.com/d/msg/web2py/SxTKewH-nS8/G5iT8ycUAKgJ Waiting for feedback Thanks, -Mandar On Saturday, July 21, 2012 1:17:33 AM UTC+5:30, joe wrote: > > That hasn't worked for me. When I

[web2py] Set a cookie and raise a 403/404

2012-08-08 Thread Yarin
Is it possible to set a cookie on a response that returns a 403/404? def bad_access(): # Set a cookie response.cookies['SOME_COOKIE'] = datetime.now() response.cookies['SOME_COOKIE']['path'] = '/' # And then throw a 403: raise HTTP(403,"An error.") This

Re: [web2py] combine Autocomplete widget and SELECT_OR_ADD_OPTION widget

2012-08-08 Thread lyn2py
Thanks Richard, I managed to do up one using jquery (different behavior), guess I won't be needing this! On Wednesday, August 8, 2012 9:32:08 PM UTC+8, Richard wrote: > > There is no slice... I didn't have time, but I can help you as much as I > can here. > > Notice that there seems to have a ne

Re: [web2py] Re: How to keep database connection alive ?

2012-08-08 Thread Amit
So as i understood, i need again re-establish the db connection before purging the records from the table , like below: @sched.interval_schedule(seconds=15) def purge_appliance_tbl(): yesterday = request.now - datetime.timedelta(days=1) db = DAL('sqlite://storage.sqlite') db(db.applian

[web2py] Re: Small bug?

2012-08-08 Thread lyn2py
Thanks Massimo! On Wednesday, August 8, 2012 10:43:40 PM UTC+8, Massimo Di Pierro wrote: > > Fixed in trunk, although I have problems pushing to github this morning. > > On Wednesday, 8 August 2012 01:06:09 UTC-5, lyn2py wrote: >> >> Correction! >> >> Good news - the form submission works again.

[web2py] Re: Cookie chaos- please see this example

2012-08-08 Thread Yarin
Got it- added the path and everything's working now. I was not aware cookies are path dependent- I thought they were restricted only by domains/sub-domains. Maybe I'm the only one, but my guess would be that a lot of people are operating under that assumption. For that reason my vote would be t

[web2py] Re: Initialize one-time configuration data in DB

2012-08-08 Thread Massimo Di Pierro
If they are contants I suggest you write them in a python file and import them. If they must be in the database, use a script to import them and run it once python web2py.py -S yourapp -M -N -R yourscript.py On Wednesday, 8 August 2012 20:30:10 UTC-5, mrtn wrote: > > > Hi, > > I need to have

[web2py] Problems with restful + PUT

2012-08-08 Thread Tito Garrido
Hi folks, *I have a simple table:* *db.define_table('estadio', Field('cod_estadio','id'), Field('nome_estadio'), Field('cidade'),migrate=False) * *A simple entry:* *estadio.cod_estadio**estadio.nome_estadio* *estadio.cidade**1**A Definir**A Definir* and using Bruno's example in web2

Re: [web2py] Re: How do larger teams develop with Web2py?

2012-08-08 Thread Massimo Di Pierro
LOL On Wednesday, 8 August 2012 20:17:33 UTC-5, rochacbruno wrote: > > > That is how I am used to work: http://programming-motherfucker.com/ --

[web2py] Re: web2py not reading Amazon SNS Subscription Confirmation requests?

2012-08-08 Thread Massimo Di Pierro
There is nothing in request.args because I assume the URL is called without args. There is nothing in request.vars because the request contains no HTTP variables. It is an HTTP post with a json data in the request body. HTTP does not know anything about json. Web2py has no clue or way to guess t

[web2py] Re: Cookie chaos- please see this example

2012-08-08 Thread Massimo Di Pierro
I can reproduce your behavior. The problem is that when you set response.cookies['LAST_FUNCTION'] = request.function you are not setting a path response.cookies['LAST_FUNCTION']['path']='/myapplication' therefore the browser assumes the scope of the cookie is the URL. web2py cannot set th

[web2py] Initialize one-time configuration data in DB

2012-08-08 Thread mrtn
Hi, I need to have a few rows of data in the database for configuration purposes. I just need to set them once and forget about them, in some sense that they are like 'constants'. What is the best approach to do this with web2py? Or should I just do it completely separately from web2py, e.g.

Re: [web2py] Re: How do larger teams develop with Web2py?

2012-08-08 Thread Bruno Rocha
That is how I am used to work: http://programming-motherfucker.com/ --

[web2py] Re: How do larger teams develop with Web2py?

2012-08-08 Thread Osman Masood
I'm a back-end developer and work in parallel with a front-end developer and designer. Because of the MVC architecture (separate models, views, and controllers), we are able to work in parallel just fine. And you're absolutely right that people at all levels can benefit from the rapid adjustment

Re: [web2py] How do larger teams develop with Web2py?

2012-08-08 Thread vinicius...@gmail.com
It's not a Web2py question. It's a team management point. As far as Web2py work with MVC (Django, Rails, etc. as well), all pros and cons apply here, too. It's a matter of your workload approach. Maybe some reading in scrum or other management technique may help you. -- Vinicius Assef On

[web2py] web2py not reading Amazon SNS Subscription Confirmation requests?

2012-08-08 Thread Osman Masood
Hi all, I'm trying to confirm an Amazon SNS subscription with a web2py controller action. The Amazon SNS subscription format is described here (through probably not necessary to understand this pr

[web2py] KeyError : 'name' when inserting/updating via sqlform.grid

2012-08-08 Thread Mandar Vaze / मंदार वझे
I have posted this query sometime ago via google-group's web interface - but it did not appear in the list - may be it is lost or held in moderation queue (This is my first post) So I am sending this again via normal gmail interface. If this is duplicate - please ignore. I'm usin

[web2py] Cookie chaos- please see this example

2012-08-08 Thread Yarin
This is a weird issue turned weirder, but I've at least been able to reproduce it: *Controller:* def func_a(): response.cookies['LAST_FUNCTION'] = request.function return str(request.cookies) def func_b(): response.cookies['LAST_FUNCTION'] = request.function return str(request.cookies)

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-08 Thread Alexei Vinidiktov
Ok. I've managed to connect to MySQL from GAE local dev server on Windows if I change line 3845 in dal.py to this: self.folder = "" instead of (self.folder = folder or '$HOME/'+thread.folder.split('/applications/',1)[1]) I don't know if it breaks anything though. On Thu, Aug 9, 2012 at 6:03 AM,

[web2py] Re: Routing problem

2012-08-08 Thread Paulo Junqueira da Costa
Hi Jonathan, It is working now as I restarted apache. Many thank´s for your response. On Wednesday, August 8, 2012 6:13:08 PM UTC-3, Paulo Junqueira da Costa wrote: > > I just uploaded my first app do production under apache and following the > manual, I wrote a routes.py as follows: > > rout

[web2py] Re: Setting cookies in models?

2012-08-08 Thread Yarin
Anthony, Rocha- thanks but this was a completely different problem- nothing to do w decorators/models- Im making another post to explain... On Wednesday, August 8, 2012 4:26:00 PM UTC-4, Yarin wrote: > > I need to set a cookie on every request, so I tried setting it in the > model, but it never

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-08 Thread Alexei Vinidiktov
The problem is still not resolved in trunk. On Mon, Aug 6, 2012 at 12:56 PM, Alexei Vinidiktov < alexei.vinidik...@gmail.com> wrote: > Here it is: db = DAL('google:sql://vocabilisproject:vocabilis/vocabilis') > > I pass the password and the user name via App Launcher parameters as > suggested in

[web2py] Re: SQLFORM.grid, checkboxes and mor than one page

2012-08-08 Thread Massimo Di Pierro
You need custom JS that when you select a checkbox calls a controller action via ajax and registers the id of the row in a session.mylist. On Wednesday, 8 August 2012 16:37:54 UTC-5, mweissen wrote: > > I have a SQLFORM.grid for 100 persons. Checkboxes are activated with a > function for the s

Re: [web2py] Re: Setting cookies in models?

2012-08-08 Thread Yarin
*model:* def tracked(fn): def wrapped(*args, **kwargs): response.cookies['TRACKED'] = request.args[0] logger.debug('TRACKED = ' + str(request.args[0])) # This WILL log return fn(*args, **kwargs) return wrapped *controller:* @tracked def test_cookies():

Re: [web2py] Re: Setting cookies in models?

2012-08-08 Thread Anthony
Probably need to see some code... On Wednesday, August 8, 2012 6:07:08 PM UTC-4, Yarin wrote: > > Guys, this problem has evolved- the issue is not models per-se- I was able > to set cookies in my models in a test app, and I was able to set them in a > decorator as well. I'm even able to get the

Re: [web2py] Re: Setting cookies in models?

2012-08-08 Thread Yarin
Guys, this problem has evolved- the issue is not models per-se- I was able to set cookies in my models in a test app, and I was able to set them in a decorator as well. I'm even able to get the cookies to write when I call the specific decorator in question from a test function. All these things

Re: [web2py] Routing problem

2012-08-08 Thread Jonathan Lundell
On 8 Aug 2012, at 2:13 PM, Paulo Junqueira da Costa wrote: > I just uploaded my first app do production under apache and following the > manual, I wrote a routes.py as follows: > > routers = dict( > BASE = dict( > default_application = 'vendasexpress', > default_controller = 'def

Re: [web2py] Re: Error in sqlhtml.py? T does not work. Proposal.

2012-08-08 Thread Martin Weissenboeck
Yes, I meant "current" I am shure I did not find the string " '%(nrows)s records found') " in the translation table. But now, with the original sqlform.py it works very fine. I have tried it more than once. You are right - T works. Please forget my message. 2012/8/8 Anthony > What is "common"?

[web2py] SQLFORM.grid, checkboxes and mor than one page

2012-08-08 Thread Martin Weissenboeck
I have a SQLFORM.grid for 100 persons. Checkboxes are activated with a function for the selectable-field. Now this long list breaks down to serveral pages. But a check on page 1 gets lost on changing to another page. So it is not possible to select persons from the whole list. Yes, with the paginat

Re: [web2py] Re: Setting cookies in models?

2012-08-08 Thread Bruno Rocha
if he is setting the cookie inside a decorator function (inner-function) maybe it gets defined on the start of the request. when the decorated function gets passed to the decorator inner-function, I guess the cookie will be already setted. (but we need to take a look at the code to figure out the

[web2py] Re: web2py 2.0 almost done

2012-08-08 Thread Massimo Di Pierro
more issues have been addressed. In order to fix an issue I had to introduce a slight change of behavior and I am not sure what is the best way to handle it. If you login using a third party service (for example janrain using facebook) and the service sends info about you, if web2py has corresp

[web2py] Routing problem

2012-08-08 Thread Paulo Junqueira da Costa
I just uploaded my first app do production under apache and following the manual, I wrote a routes.py as follows: routers = dict( BASE = dict( default_application = 'vendasexpress', default_controller = 'default', default_function = 'index', domains = { 'venda

[web2py] Re: web2py 2.0 almost done

2012-08-08 Thread Massimo Di Pierro
This is puzzling. Is it a physiological delay? On Wednesday, 8 August 2012 01:08:27 UTC-5, lyn2py wrote: > > Thanks Akash for informing about downloading zip vs clone git. > I also experienced that the zip download is not the most recent with > changes. > Cloning gets the latest. > > On Wednesda

[web2py] Re: Cross-subdomain login status detection

2012-08-08 Thread Massimo Di Pierro
If you use apache there is a way using this script provided by web2py. web2py/scripts/access.wsgi Some explanations are inside. On Wednesday, 8 August 2012 14:11:17 UTC-5, Yarin wrote: > > I've got a public-facing non-web2py website at our root domain ( > http://ourdomain.com), and a web2py app

Re: [web2py] Re: Setting cookies in models?

2012-08-08 Thread Anthony
On Wednesday, August 8, 2012 4:51:58 PM UTC-4, rochacbruno wrote: > > > I think you need to use "current" > > from gluon import current > > and inside the decorator function access current.request instead of request > Is the cookie being set in a model file or a module? current shouldn't be neede

Re: [web2py] Re: Setting cookies in models?

2012-08-08 Thread Bruno Rocha
I think you need to use "current" from gluon import current and inside the decorator function access current.request instead of request On Wed, Aug 8, 2012 at 5:48 PM, Yarin wrote: > A little more about what I'm trying to do: > > I have a decorator function defined in a model that I use to

[web2py] Re: Setting cookies in models?

2012-08-08 Thread Yarin
A little more about what I'm trying to do: I have a decorator function defined in a model that I use to decorate many of my controller functions. I want to set the cookie within this decorator. On Wednesday, August 8, 2012 4:26:00 PM UTC-4, Yarin wrote: > > I need to set a cookie on every reques

[web2py] How do larger teams develop with Web2py?

2012-08-08 Thread Luc Chase
What particular constraints and advantages does using web2py tend to bring for larger project development teams as opposed to those working solo or in very small teams? I assume for example these roles benefit from rapid feedback and ability to adjust requirements more easily? - Project sta

Re: [web2py] Retreive value (option) from a select list

2012-08-08 Thread Mathias Van Daele
Thanks !! 2012/8/8 Richard Vézina : > It's just a matter of selecting the proper html select and get the selected > value. > > Richard > > On Wed, Aug 8, 2012 at 1:33 PM, Mathias Van Daele > wrote: >> >> Thanks for your reply Richard ! >> >> I was hoping I could find a solution without extra Jque

[web2py] Setting cookies in models?

2012-08-08 Thread Yarin
I need to set a cookie on every request, so I tried setting it in the model, but it never works. Setting it in controllers is no problem. I couldn't find any documentation on this- is this behavior expected? If so, is there a way to ensure a cookie gets set on every request, short of setting it

Re: [web2py] *** integer values into string variable ***

2012-08-08 Thread Vladimir Makarov
*My problem is solved. Thank you Bruno!!!* *I used to set this field to integer and then changed it to string.* *So... now it's OK - I set CHAR type for the field in SQLITEMAN.* On Wednesday, August 8, 2012 11:35:13 PM UTC+4, rochacbruno wrote: > > Is that SQLITE? did you created it as integer an

Re: [web2py] *** integer values into string variable ***

2012-08-08 Thread Bruno Rocha
Is that SQLITE? did you created it as integer and after that changed to string? SQLITE does not have ALTER-TABLE command, so even if you change a field from integer to string, web2py will see it as string, but the db will still store as integer. You need to change the datatype to CHAR() on your s

[web2py] *** integer values into string variable ***

2012-08-08 Thread Vladimir Makarov
Hi there! I am a bit puzzled by the following problem. In my db.py file I use *string *type for the field. Field('ras', 'string', label=T('Account'), requires=IS_NOT_EMPTY(error_message='you should enter number of your account')), But when I insert some value into this field, for example * 3010

Re: [web2py] Again: how redirect without propagate the .load extension?

2012-08-08 Thread Anthony
Looks good. :-) On Wednesday, August 8, 2012 3:20:13 PM UTC-4, Massimo Di Pierro wrote: > > I agree. Please check trunk again. > > On Aug 8, 2012, at 2:04 PM, Anthony wrote: > > On Wednesday, August 8, 2012 1:18:11 PM UTC-4, Massimo Di Pierro wrote: >> >> ok, I defaulted to type='http' as you did

[web2py] MARKMIN change of behavior

2012-08-08 Thread Massimo DiPierro
There is a manor change of behavior in MARKMIN. Before: - markmin # title aaa bbb -- end markmin would render as titleaaa After: the same markmin would render title aaa In other words now headers (#, ##, ###) can be continued to the next line and need an empty n

[web2py] Re: Error in sqlhtml.py? T does not work. Proposal.

2012-08-08 Thread Anthony
What is "common"? Do you mean current.T? Note, in grid(), there is this assignment: T = current.T. So, T(...) should work. Anthony On Wednesday, August 8, 2012 2:41:42 PM UTC-4, mweissen wrote: > > SQLFORM.grid write "... records found", but this sentence is not in the > translation table. > >

Re: [web2py] Again: how redirect without propagate the .load extension?

2012-08-08 Thread Massimo DiPierro
I agree. Please check trunk again. On Aug 8, 2012, at 2:04 PM, Anthony wrote: > On Wednesday, August 8, 2012 1:18:11 PM UTC-4, Massimo Di Pierro wrote: > ok, I defaulted to type='http' as you did but I allowed a type='auto' as well. > > Good idea. Actually, I'm not sure we need the separate "aut

[web2py] Cross-subdomain login status detection

2012-08-08 Thread Yarin
I've got a public-facing non-web2py website at our root domain (http://ourdomain.com), and a web2py app at a subdomain (http://app.ourdomain.com). When a user comes to the root site that has a valid logged in session with our app, I'd like to redirect them to the app subdomain automatically.

Re: [web2py] Again: how redirect without propagate the .load extension?

2012-08-08 Thread Anthony
On Wednesday, August 8, 2012 1:18:11 PM UTC-4, Massimo Di Pierro wrote: > > ok, I defaulted to type='http' as you did but I allowed a type='auto' as > well. > Good idea. Actually, I'm not sure we need the separate "auto" option -- type='client' only makes sense for Ajax requests anyway, so why n

[web2py] Error in sqlhtml.py? T does not work. Proposal.

2012-08-08 Thread Martin Weissenboeck
SQLFORM.grid write "... records found", but this sentence is not in the translation table. In sqlhtml.py line 1956 there is "T('%(nrows)s records found')". I think it should be "common.T('%(nrows)s records found')" This change works for me. There are some other "T"s in sqlhtml - I have all of the

Re: [web2py] favicon

2012-08-08 Thread Massimo Di Pierro
I removed and moved the favicon(s) in the images subfolder. Chan you please check it? On Wednesday, 8 August 2012 13:14:04 UTC-5, Richard wrote: > > Hello, > > I read this comment in layout of welcome app for 1.99.4 (sorry if it gone) > : > > > > It is about those 2 lines : > >type="image/x

[web2py] Re: Send validation keys to list of emails, so they can update their details?

2012-08-08 Thread Massimo Di Pierro
# insert all the emails for email in emails: db.auth._user.insert(email=email) # ask everybody to reset their password for login for user in db(db.auth_user.email.belongs(emails)).select(): auth.email_reset_password(user) On Wednesday, 8 August 2012 12:47:57 UTC-5, Alec Taylor wrote:

[web2py] favicon

2012-08-08 Thread Richard Vézina
Hello, I read this comment in layout of welcome app for 1.99.4 (sorry if it gone) : It is about those 2 lines : I think that those links are the proper way to insert favicon base on w3c : http://www.w3.org/2005/10/howto-favicon So the comment is miss leading I think. Should be remove

Re: [web2py] Retreive value (option) from a select list

2012-08-08 Thread Richard Vézina
It's just a matter of selecting the proper html select and get the selected value. Richard On Wed, Aug 8, 2012 at 1:33 PM, Mathias Van Daele wrote: > Thanks for your reply Richard ! > > I was hoping I could find a solution without extra Jquery, but I will > try it with Jquery . > > Mathias > >

Re: [web2py] Re: Search in Web2Py

2012-08-08 Thread Alec Taylor
On Thu, Aug 9, 2012 at 12:37 AM, Massimo Di Pierro wrote: > I am considering adding Whoosh support in DAL That would be an excellent addition =) How are you considering presenting it, e.g.: as a `crud.search` replacement using `SQLFORM`? > On Tuesday, 7 August 2012 23:52:48 UTC-5, Anthony w

[web2py] Send validation keys to list of emails, so they can update their details?

2012-08-08 Thread Alec Taylor
I am about to import a list of people into web2py. Each person's record has an email address at the very least. One purpose for moving to web2py is to allow people to update their details, and only their details. How would I go about generating accounts for people, emailing them their validati

[web2py] Re: Scheduler: help us test it while learning

2012-08-08 Thread Daniel Haag
Hi Niphlod, thanks for the great work with the scheduler, I'm using it in a project where it handles lots of big data imports into a database and the migration to your version was without any problems. On thing catched my eye in the old version and it still seems to be a "problem/missing featu

[web2py] KeyError: 'name' when inserting/updating via appadmin

2012-08-08 Thread Mandar Vaze
I'm using web2py version : Version 2.0.0 (2012-07-26 06:06:10) dev I have tables defined as follows : name = db.Table(db, 'name', Field('name', 'string', length=128, notnull=True, unique=True))

Re: [web2py] Retreive value (option) from a select list

2012-08-08 Thread Mathias Van Daele
Thanks for your reply Richard ! I was hoping I could find a solution without extra Jquery, but I will try it with Jquery . Mathias 2012/8/8 Richard Vézina : > With .val() > http://api.jquery.com/val/ > > With :selected > http://api.jquery.com/selected-selector/ > > This could also interest you :

[web2py] Re: How to keep database connection alive ?

2012-08-08 Thread Massimo Di Pierro
yes. it should On Wednesday, 8 August 2012 11:36:58 UTC-5, Anthony wrote: > > SQLite ignores the pool_size parameter, though, right? In any case, > shouldn't a background task run through the scheduler be able to establish > a db connection, even without pooling? > > Anthony > > On Wednesday, Au

Re: [web2py] Again: how redirect without propagate the .load extension?

2012-08-08 Thread Massimo Di Pierro
ok, I defaulted to type='http' as you did but I allowed a type='auto' as well. On Wednesday, 8 August 2012 10:30:06 UTC-5, Anthony wrote: > > On Wednesday, August 8, 2012 11:05:42 AM UTC-4, Massimo Di Pierro wrote: >> >> In trunk, with a minor change that makes the type parameter optional and >>

Re: [web2py] Re: Implementing a messaging system

2012-08-08 Thread Bruno Rocha
In this page: http://dev.s-cubism.com/web2py_plugins you can find a set of plugins, one of them are message plugin. (experimental, but I used and it works well) Also there is a video (in portuguese) about real time message: https://vimeo.com/38972256 --

[web2py] Re: How to keep database connection alive ?

2012-08-08 Thread Anthony
SQLite ignores the pool_size parameter, though, right? In any case, shouldn't a background task run through the scheduler be able to establish a db connection, even without pooling? Anthony On Wednesday, August 8, 2012 10:45:18 AM UTC-4, Massimo Di Pierro wrote: > > Normally you would do > > db

[web2py] Compute field update/update_record problem

2012-08-08 Thread Marek Mollin
Hello, I know this has been flagged in past. Still I could not find a clean solution to handle such events. When either updating or updating record if fields/keys used in compute are not provided it throws a KeyError. Ok I can handle that no problem. Try,except: pass, but If I do pass it assigns

Re: [web2py] Retreive value (option) from a select list

2012-08-08 Thread Richard Vézina
With .val() http://api.jquery.com/val/ With :selected http://api.jquery.com/selected-selector/ This could also interest you : http://stackoverflow.com/questions/496052/jquery-setting-the-selected-value-of-a-select-control-via-its-text-description Richard On Wed, Aug 8, 2012 at 11:05 AM, Mathias

[web2py] Re: Implementing a messaging system

2012-08-08 Thread shartha
Thanks for the replies. What I need is not a realtime messaging system, also that is something I have in mind for future extensions -- so still helpful, thanks. My need is more like an emailing system where each user will have an inbox, sent and trash folder, and messages are shown in a thread

Re: [web2py] Again: how redirect without propagate the .load extension?

2012-08-08 Thread Anthony
On Wednesday, August 8, 2012 11:05:42 AM UTC-4, Massimo Di Pierro wrote: > > In trunk, with a minor change that makes the type parameter optional and > auto-detects ajax. > I don't think it should auto-detect ajax and automatically do a client-side full-page redirect in that case. Note, you don'

Re: [web2py] Re: Appengine CPU cycles

2012-08-08 Thread Massimo Di Pierro
Thanks for the clarification. On Wednesday, 8 August 2012 10:09:27 UTC-5, Felipe Meirelles wrote: > > Sorry about the URL confusion. The processing on web2py version is done on > /queues/position, while in the django one is done in /api/position as I > didnt implemented queues on the django vers

Re: [web2py] Re: Appengine CPU cycles

2012-08-08 Thread Jonathan Lundell
On 8 Aug 2012, at 7:59 AM, Massimo Di Pierro wrote: > It is likely Django uses simplejson binary while web2py (for portability) > only ships with simplejson in pure python. This may be another performance > loss if you use json a lot. We need to fix this at the web2py level. > This is fixed in

Re: [web2py] Re: Appengine CPU cycles

2012-08-08 Thread Felipe Meirelles
Sorry about the URL confusion. The processing on web2py version is done on /queues/position, while in the django one is done in /api/position as I didnt implemented queues on the django version. Json dumps and loads are only used on web2py version, but not using the shipped simplejson (it realy ha

[web2py] Re: Implementing a messaging system

2012-08-08 Thread Massimo Di Pierro
web2py comes with a realime messaging engine in gluon/contrib/comet_messaging.py. It requires tornado installed. read the docstrings in the file for more info. It is not well documented but there is a video about it http://vimeo.com/18399381. On Tuesday, 7 August 2012 23:58:33 UTC-5, shartha wr

Re: [web2py] Again: how redirect without propagate the .load extension?

2012-08-08 Thread Massimo Di Pierro
In trunk, with a minor change that makes the type parameter optional and auto-detects ajax. On Wednesday, 8 August 2012 08:21:33 UTC-5, Anthony wrote: > > Attached is a patch that enables client-side full-page redirects from Ajax > requests. It alters the redirect() function in http.py as well a

[web2py] Retreive value (option) from a select list

2012-08-08 Thread Mathias
Hello, How can I retreive the selected value (option), from an HTML select ? I want to use this in an ajax function, but I don't know how to get the value. Thanks Mathias --

Re: [web2py] Re: Appengine CPU cycles

2012-08-08 Thread Massimo Di Pierro
I do not understand. When you compare Django vs web2p[y performance, you seem to be comparing the MCycles for /api/1.0/position

[web2py] Re: Small bug?

2012-08-08 Thread Massimo Di Pierro
Fixed in trunk, although I have problems pushing to github this morning. On Wednesday, 8 August 2012 01:06:09 UTC-5, lyn2py wrote: > > Correction! > > Good news - the form submission works again. >> However, the form%20accepted is not resolved, >> > > The good news is correct and the form%20acce

[web2py] Re: How to keep database connection alive ?

2012-08-08 Thread Massimo Di Pierro
Normally you would do db = DAL('sqlite://storage.sqlite',pool_size=10) where 10 is the max number of connections to keep alive and to be recycled across multiple requests. I am not sure how this interact with scheduler. On Wednesday, 8 August 2012 01:59:06 UTC-5, Amit wrote: > > > Hi, > I am us

[web2py] Re: register form and service conditions acceptance

2012-08-08 Thread Marco Prosperi
thank you for pointing that out. In this form it works (I've forced id=999 for PluginMModal in user.html) _onclick="jQuery('#999').fadeIn(); return false' On Wednesday, August 8, 2012 2:00:10 PM UTC+2, Anthony wrote: > > auth.settings.extra_fields['auth_user']= [ >> Field('accept_privacy

Re: [web2py] update_or_insert() inserting id=None

2012-08-08 Thread vinicius...@gmail.com
Thanks Richard. That's not necessary. I just found out my sqlite table was corrupted. By some reason ID field was not created as autoincrement. I dropped the table and recreated it. Now it's working fine. Thank you. -- Vinicius Assef On 08/08/2012 11:35 AM, Richard Vézina wrote: Open an i

[web2py] Re: Search in Web2Py

2012-08-08 Thread Massimo Di Pierro
I am considering adding Whoosh support in DAL On Tuesday, 7 August 2012 23:52:48 UTC-5, Anthony wrote: > > There's nothing built in (would be nice, though), but web2py should work > fine with any standard search functionality (e.g., SQLite and Postgres full > text search, Whoosh, Sphinx, Sol

Re: [web2py] update_or_insert() inserting id=None

2012-08-08 Thread Richard Vézina
Open an issue on google code! Which web2py version? Richard On Wed, Aug 8, 2012 at 10:10 AM, vinicius...@gmail.com < vinicius...@gmail.com> wrote: > Hi folks. > > I'm facing a problem with table.update_or_insert(). > > I have: my_tab.update_or_insert(my_**tab.name ==my_name,

Re: [web2py] Redirect to requested function

2012-08-08 Thread Jonathan Lundell
On 8 Aug 2012, at 3:10 AM, Annet wrote: > My application is completely nodeID driven, so all front end function run the > following test: > > if not len(request.args) or request.args(0)!=session.id: > redirect(URL('addressbook','router',args=request.args(0))) If you can identify your f

[web2py] update_or_insert() inserting id=None

2012-08-08 Thread vinicius...@gmail.com
Hi folks. I'm facing a problem with table.update_or_insert(). I have: my_tab.update_or_insert(my_tab.name==my_name, name=my_name, phone=my_phone) When the search condition is not satisfied (i.e no records found) a new record with id=None is inserted in my_tab. The action is correct, but id

Re: [web2py] Implementing a messaging system

2012-08-08 Thread Bruno Rocha
did you see the messaging plugin? web2py.com/plugins http://zerp.ly/rochacbruno Em 08/08/2012 01:58, "shartha" escreveu: > > Hi, I'd like to implement a messaging system (between the users of the > website), and I need help to implement it. The way I've done it is to > create a message table th

Re: [web2py] Re: web2py 2.0 almost done

2012-08-08 Thread Johann Spies
On 8 August 2012 15:36, Anthony wrote: > As I recall, the autocomplete doesn't work at all in IE (at least not < 9, > not sure about 9). That's why I was thinking we should switch to a > third-party client-side widget. This was on LInux and with Firefox. I would appreciate any solution what wo

Re: [web2py] Re: web2py hangs while creating the mysql tables

2012-08-08 Thread Yarin
@Aurelijus- If you're dealing with foreign key errors you may have to clean the constraints up manually in MySQL- It's actually pretty easy to corrupt the foreign key constraints with web2py's db definitions, and cleanup is a bitch if you don't know exactly what to do. See my post on this, and f

Re: [web2py] Re: web2py 2.0 almost done

2012-08-08 Thread Anthony
On Wednesday, August 8, 2012 5:30:10 AM UTC-4, lyn2py wrote: > > Does this mean that if I uncomment the jquery-ui in layout.html, the > autocomplete will be working even on IE? > No, jQuery UI autocomplete is not implemented with web2py. Anthony --

Re: [web2py] Re: web2py 2.0 almost done

2012-08-08 Thread Anthony
As I recall, the autocomplete doesn't work at all in IE (at least not < 9, not sure about 9). That's why I was thinking we should switch to a third-party client-side widget. Anthony On Wednesday, August 8, 2012 8:53:00 AM UTC-4, Johann Spies wrote: > > On Tuesday, 7 August 2012 17:23:34 UTC+2,

Re: [web2py] combine Autocomplete widget and SELECT_OR_ADD_OPTION widget

2012-08-08 Thread Richard Vézina
There is no slice... I didn't have time, but I can help you as much as I can here. Notice that there seems to have a new implementation of the autocomplete widget coming with the new web2py 2.0, so I will have to look at the code and implement again the add option to it. Richard On Tue, Aug 7, 2

Re: [web2py] Again: how redirect without propagate the .load extension?

2012-08-08 Thread Anthony
Attached is a patch that enables client-side full-page redirects from Ajax requests. It alters the redirect() function in http.py as well as adding an event handler in web2py.js. With it, in a function called via Ajax, you can do: def my_ajax_function(): if some_condition: redirect(

  1   2   >