[web2py] Re: Self Referential references in models not getting id decoded automatically

2012-02-05 Thread Mark Kirkwood
Ok figured out what was causing that - I had one record with '0' for a sire_id and no dog with id = 0. Fixing that up makes the representation code below work. Yay! *But*... now the edit drop down list is showing id's instead of names... scratches head I'm sure that *was* working before I

[web2py] Re: Debugging in web2py

2012-02-05 Thread Web2Py Freak
i am trying to use wing but how can i use it on a application that is deployed on apache

[web2py] Anyone deployed web2py on 1and1 shared hosting?

2012-02-05 Thread Edward Shave
If so, would appreciate any pointers. I'm a beginner with little or no experience and don't know where to start... :o)

[web2py] Re: lungo.js

2012-02-05 Thread Oli
we should have a mobile solution for web2py "out of the box". Would this be possible?

[web2py] web2py + twitter bootstrap 2.0

2012-02-05 Thread sungchi
service like reddit(korean) : http://www.feed9.com/ source : https://github.com/sungchi/feed9 Thank you web2py, Thank you twitter !

[web2py] Re: web2py + twitter bootstrap 2.0

2012-02-05 Thread sungchi
most prominent changes of twitter bootstrap 2.0 : New 12-column, "responsive grid system" New table styles with a common base class for improved compatibility with other tools New form styles with smarter defaults, requiring less HTML Icons, graciously provided by Glyphicons New, smarter navigatio

Re: [web2py] Re: lungo.js

2012-02-05 Thread Carlos Costa
+1 2012/2/5 Oli : > we should have a mobile solution for web2py "out of the box". Would this be > possible? -- Carlos J. Costa Cientista da Computação Esp. Gestão em Telecom EL MELECH NEEMAN! אָמֵן

[web2py] Transparently convert request.vars into unicode strings

2012-02-05 Thread Vladimir Rutsky
Hello! What is the best way to transparently convert all variables in request.post_vars to Python unicode strings? When I submit string with non-ascii characters using AJAX from browser to web2py application I receive usual Python 2.6 string (str) in request.post_vars.foo with submitted string en

Re: [web2py] Transparently convert request.vars into unicode strings

2012-02-05 Thread Bruno Rocha
On Sun, Feb 5, 2012 at 11:26 AM, Vladimir Rutsky wrote: > unicode(request.post_vars.foo, 'utf-8') > Use dictionary comprehension, in models 0.py do: from gluon.storage import Storage > > request.post_vars = Storage({key: unicode(value, 'utf-8') for key, value > in request.post_vars.items()}) >

[web2py] Re: Transparently convert request.vars into unicode strings

2012-02-05 Thread Alan Etkin
Perhaps web2py must retrieve the client's charset and convert accordingly the input, as the framework uses UTF-8 internally. If web2py expects always UTF-8, this could be reported as an issue. The server response could also be re-converted for client's compatibility. On 5 feb, 10:26, Vladimir Ruts

[web2py] Re: BrowserID web2py authentication plugin done! Please test

2012-02-05 Thread Alan Etkin
Congratulations. I tried to open the url of the project and it returns a 404 error. On 4 feb, 12:54, whowhywhat wrote: > Dear Web2py community, > I just finished writing a web2py authentication plugin (custom > authentication) to authenticate using BrowserID accounts (https:// > browserid.org). B

[web2py] Re: Anyone deployed web2py on 1and1 shared hosting?

2012-02-05 Thread Alan Etkin
The web2py book's 13.1.8 section has information to install web2py in shared hostings with apache and mod_python On 5 feb, 07:07, Edward Shave wrote: > If so, would appreciate any pointers. I'm a beginner with little or no > experience and don't know where to start... :o)

Re: [web2py] Re: bug ticket for IS_IN_DB validator

2012-02-05 Thread Manuele Pesenti
Il 05/02/2012 03:16, DenesL ha scritto: In the issue report you say: What steps will reproduce the problem? 1. create a table (for example: db.define.table('mytab', Field('foo'))) ... IS_IN_DB(db, 'mytab.id', '%(foo)s', multiple=True)(value) but IS_IN_DB(..., multiple=True) should be u

Re: [web2py] lungo.js

2012-02-05 Thread Bruno Rocha
looks much better than Jquery mobile, and simple to implement. Thanks for sharing it! On Fri, Feb 3, 2012 at 2:53 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > http://www.lungojs.com/ -- Bruno Rocha [http://rochacbruno.com.br]

[web2py] Re: web2py + twitter bootstrap 2.0

2012-02-05 Thread Massimo Di Pierro
Rally Nice. On Feb 5, 4:58 am, sungchi wrote: > most prominent changes of twitter bootstrap 2.0 : > > New 12-column, "responsive grid system" > New table styles with a common base class for improved compatibility > with other tools > New form styles with smarter defaults, requiring less HTML > I

[web2py] Re: web2py + twitter bootstrap 2.0

2012-02-05 Thread Massimo Di Pierro
You you be able to add a README to the github page with a screenshot and a link to feed9? On Feb 5, 4:52 am, sungchi wrote: > service like reddit(korean) :http://www.feed9.com/ > source :https://github.com/sungchi/feed9 > > Thank you web2py, > Thank you twitter !

Re: [web2py] validator for valid SQL table name

2012-02-05 Thread Manuele Pesenti
Il 03/02/2012 11:03, Bruno Rocha ha scritto: look the code in dal.py referencing check_reserved, you can copy patterns and dicts from there in to your validator. http://zerp.ly/rochacbruno ok thanks again Bruno, I solved defining this subsequent custom validator with some cut&paste code fr

[web2py] Re: lungo.js

2012-02-05 Thread Massimo Di Pierro
Yes. Right now web2py comes with skeleton which provides flexible layouts. Do people think we need to include something like lungo.js? And/or replace skeleton with boostrap 2.0? On Feb 5, 4:46 am, Oli wrote: > we should have a mobile solution for web2py "out of the box". Would this be > possible?

[web2py] Getting the name of the Application

2012-02-05 Thread Sathvik Ponangi
How do I get the name of the current Web2Py app, so that my code is resilient to app-name changes?

Re: [web2py] Re: geo-capabilities for DAL

2012-02-05 Thread Manuele Pesenti
Il 04/02/2012 16:30, Massimo Di Pierro ha scritto: We are working on this and you should expect it as one of the next web2pu features. veeery good news :) thanks! M.

Re: [web2py] Getting the name of the Application

2012-02-05 Thread David
On 2/5/12 10:06 AM, Sathvik Ponangi wrote: How do I get the name of the current Web2Py app, so that my code is resilient to app-name changes? request.application I think, but its in the docs.

[web2py] web2py and mongodb - current status

2012-02-05 Thread David Marko
Hello, recently there was some discussion on mongodb intergration effort ... what is the current status? Is there anyone working with web2py and mongodb? Any experience ? David

[web2py] Re: DAL Limitations with aggregate and union queries

2012-02-05 Thread Niphlod
well, same old, same old sorry for the introduction, but I work as a DBA and query tuning/optimization is in front of my eyes for more than 8 hours a day ;-) The first thing you learn in this job is try. The second is try. The third is try. The fourth is "understand the complexity". The fifth

[web2py] Re: Self Referential references in models not getting id decoded automatically

2012-02-05 Thread DenesL
You could do: def register_dog(): if request.args(0) == 'edit': db.dog.sire_id.requires = IS_IN_DB(db(db.dog.id! =request.args(2)), db.dog, db.dog._format) form=SQLFORM.grid(db.dog, csv=False, paginate=5, user_signature=False) return dict(form=form) On Feb 5, 4:23 am, Mark Kir

Re: [web2py] validator for valid SQL table name

2012-02-05 Thread Manuele Pesenti
Il 05/02/2012 15:58, Manuele Pesenti ha scritto: ok thanks again Bruno, I solved defining this subsequent custom validator with some cut&paste code from dal.py as suggested: I beg your pardon too many bugs in my previous code and not enough test... that's a better solution: in modules/plugi

[web2py] Re: how to restart only one app in uwsgi?

2012-02-05 Thread Niphlod
I think the default /etc/init.d script for uwsgi-python allows specifying the "app" name (actually it's the name of the config file) only for "status", i.e. /etc/init.d/uwsgi-python status appname However, pids are in /var/run/uwsgi-python/appname/pid. If I'm not wrong, sighup to the master proce

[web2py] Adding application specific data to httpserver.log ?

2012-02-05 Thread JC11
Hello, I need to add logging to my application. Out of the box, httpserver.log supplies 90% of what I want, but I'd love to add another piece or two of data to it. The data to add is specific to my application and present on the incoming URLs. Any advice on where I should start ? Thanks, Joh

[web2py] Re: Adding application specific data to httpserver.log ?

2012-02-05 Thread Massimo Di Pierro
The logging is done by appfactory, in main.py at around line 700. appfactory is a wsgi middleware that wraps wsgibase (the main web2py wsgi app). Anything passed in the http headers can be logged. On Feb 5, 10:22 am, JC11 wrote: > Hello, > > I need to add logging to my application. Out of the b

[web2py] Re: BrowserID web2py authentication plugin done! Please test

2012-02-05 Thread whowhywhat
https://browserid.org/ .. seems to be working fine here. It is a promising project in its infancy. I think they may have some teething problems. They won a rookie award at the 2011 black duck open software awards: http://www.blackducksoftware.com/rookies/ Am sure every good web service has had its

[web2py] update with variable field (stored in variable)

2012-02-05 Thread Serbitar
I need to do something like this: variable_field = 'val1' x = 2 id = 1 db.define_table('a', Field('name', type = 'integer'), Field('val1', type = 'integer'), Field('val2', type = 'integer') ) db(db.a.id==id).update(variable_field=x) this obviously doesnt work. Any way to do that?

[web2py] Re: update with variable field (stored in variable)

2012-02-05 Thread Anthony
On Sunday, February 5, 2012 2:04:13 PM UTC-5, Serbitar wrote: > > I need to do something like this: > > variable_field = 'val1' > x = 2 > id = 1 > > db.define_table('a', > Field('name', type = 'integer'), > Field('val1', type = 'integer'), > Field('val2', type = 'integer') > )

[web2py] Re: lungo.js

2012-02-05 Thread Anthony
Looks cool. Note, it's GPLv3 for app development, and paid commercial for OEM uses. On Friday, February 3, 2012 11:53:40 AM UTC-5, Massimo Di Pierro wrote: > > http://www.lungojs.com/

[web2py] Re: DAL Limitations with aggregate and union queries

2012-02-05 Thread Simon Lukell
As a 'bystander', I personally think that Niphlod's response is of such good quality that the gist of it deserves inclusion in the book.

[web2py] Re: is there an easier way to do subtotals/grouping?

2012-02-05 Thread Niphlod
Normally I don't need big "messes" but if you show us a sample dataset (original data on the table) and a "required" resultset (data in the format you want) at least we can analyze it and tell you the "ways" of doing that. Just looking at your request I can tell that if you have gazillions of

[web2py] Re: Self Referential references in models not getting id decoded automatically

2012-02-05 Thread Mark Kirkwood
A simpler fix for the edit/add functions is to specify a format in the model: db.dog.sire_id.requires = IS_EMPTY_OR(IS_IN_DB(db, 'dog.id', '%(name)s')) (Hmm ... suspect I had that there before at some stage which, but edited the format away when I was trying to pin down the other problems - o

[web2py] Re: DAL patch to support fractional seconds

2012-02-05 Thread howesc
GAE gives me fractional sections all the time when i convert to strings (to say pass as a URL parameter to query for the next section of the results). turns out that GAE stores fractional sections in the DB, and an accurate query would include them. i have worked around it satisfactorily for n

[web2py] Re: DAL Limitations with aggregate and union queries

2012-02-05 Thread Massimo Di Pierro
+1 On Feb 5, 3:20 pm, Simon Lukell wrote: > As a 'bystander', I personally think that Niphlod's response is of > such good quality that the gist of it deserves inclusion in the book.

[web2py] keep shared objects permanently in RAM: Is it possible ?

2012-02-05 Thread Sebastian E. Ovide
Hi All, Is it possible to keep a BIG chunk of information in memory RAM permanently (without reloading it for each new session/request) so that different sessions (from X different users using the system at the same time) can access (R/W) it concurrently ? For the kind of processing that need to b

Re: [web2py] keep shared objects permanently in RAM: Is it possible ?

2012-02-05 Thread Bruno Rocha
Redis or MongoDB seems to be what you are looking for! On Sun, Feb 5, 2012 at 9:58 PM, Sebastian E. Ovide < sebastian.ov...@gmail.com> wrote: > Hi All, > > Is it possible to keep a BIG chunk of information in memory RAM > permanently (without reloading it for each new session/request) so that >

[web2py] Re: DAL patch to support fractional seconds

2012-02-05 Thread nick name
I tried to maintain backward compatibility in the best way possible - by keeping the old code in place if you don't need higher resolution. (Note, however, that there's a place in DAL where time() retains microseconds, and datetime does not, which was probably a bug -- in that case, I fixed it

[web2py] Re: web2py + twitter bootstrap 2.0

2012-02-05 Thread sungchi
Thank you for your advice. On 2월5일, 오후11시57분, Massimo Di Pierro wrote: > You you be able to add a README to the github page with a screenshot > and a link to feed9? > > On Feb 5, 4:52 am, sungchi wrote: > > > > > > > > > service like reddit(korean) :http://www.feed9.com/ > > source :https://gith

[web2py] web2py+arvixe hosting

2012-02-05 Thread Alex s
Hello, Anyone has some experience installing web2py in arvixe shared hosting? I created an account but they are not having success to install it. Thanks Alex

[web2py] Re: Minify (compress) response HTML

2012-02-05 Thread Kernc
On Feb 3, 6:07 am, Massimo Di Pierro wrote: > OK, let's add a minifier in contrib. Thanks! :-)

[web2py] Re: Anyone deployed web2py on 1and1 shared hosting?

2012-02-05 Thread Edward Shave
Yes, thanks for that. I managed to run info.py and there was no mention of mod_python. I couldn't even work out how to copy files to htdocs. Anyway, have decided to move to webfaction where it seems I will have much more control and access. I was just hoping someone may have already done it. ;o

[web2py] DAL Connection String

2012-02-05 Thread Hugh Barker
Hi, I have a bit of a problem with my connection string in db.py - specifically, the database password has a '@' symbol, and so web2py chokes because it assumes this is the delimiter between password and host. I had a look at dal.py and I guess the regex needs modifying to take this case into a

[web2py] Re: using radio widget can't receive the empty submit

2012-02-05 Thread Dan
My view did include the default layout, I omit it when I writing this discussions. The response.flash can show up when I submit my first form. But it doesn't work when I submit the second form which used the widget = SQLFORM.widgets.radio.widget. On Feb 3, 1:27 am, DenesL wrote: > Your view does