[web2py] Conditional represent

2012-05-19 Thread Annet
In a model I have the following validator: db.Register.repliedOn.requires=IS_EMPTY_OR(IS_DATETIME(format='%Y-%m-%d %H:%M:%S')) db.Register.repliedOn.represent = lambda v, row: v.strftime('%d/%m/%Y %H:%M:%S') When repliedOn is empty I get the following error: File "/Library/Python/2.5/site-pac

[web2py] Re: nginx uwsgi error 502 bad gate way

2012-05-19 Thread Gour
On Fri, 18 May 2012 14:53:40 -0700 (PDT) Lewis wrote: > Well, I revised my init.d script to work. > > Config files do not work at all in any way, shape or form. Just > broken utterly. > It turns out even loading simple startup variables to the init script > does not work. Period. [...] > So

[web2py] Re: Conditional represent

2012-05-19 Thread Paolo Caruccio
please try: db.Register.repliedOn.represent = lambda v, row: v.strftime('%d/%m/%Y %H:%M:%S') if v else "" Il giorno sabato 19 maggio 2012 09:00:37 UTC+2, Annet ha scritto: > > In a model I have the following validator: > > db.Register.repliedOn.requires=IS_EMPTY_OR(IS_DATETIME(format='%Y-%m-%d

[web2py] Re: Bootstrap and custom forms and widgets

2012-05-19 Thread Pystar
Hi matt, I have been working extensively with bootstrap with web2py and I can say the approach you are taking is the best way. This is my solution #controller3 form = SQLFORM(db.blahblah) if form.accepts(request, session, hideerrror=True): blahblah the hideerro

[web2py] how to see line number or errors in my own module

2012-05-19 Thread Sebastian E. Ovide
Hi All, In my controller I'm importing my own module class with from messaging import Msg If my class has any error (say a typo for example), then web2py opens the usual ticket, but it doesn't show the line where the actual error occurred. It shows the line where the *controller imported the mo

[web2py] is globalenv official ?

2012-05-19 Thread Sebastian E. Ovide
Hi all, I've seen *globalenv* in current which is I find very useful.. as It is not documented in the official book (at least the search cannot find it), just wondering if it is part of the official web2py and therefore it will be there for ever.. thanks -- Sebastian E. Ovide

[web2py] Re: Is there anyone who running web2py application on Redhat openshift?

2012-05-19 Thread JungHyun Kim
Andrew!! It works !!! Two things were keys. 1. setting gluon module in "libs" directory 2. and making environment to see that module. Thank you for your help! :) 2012년 5월 19일 토요일 오후 12시 14분 5초 UTC+9, Andrew 님의 말: > > JungHyun, > > > Here's my project structure with application file attached-

[web2py] How to get the selected menu / active menu ?

2012-05-19 Thread François Delpierre
Hi, Here is my solution : If my response.menu is somthing like : response.menu = [('Menu1', False), ('Menu2', True), ('Menu3', False)] I can use this in my view to display the active menu : {{=[x[0] for x in response.menu if x[1]==True][0]}} It's working well, but is there no better and more e

[web2py] SQLFORM.grid import

2012-05-19 Thread Jonathan Lundell
It'd be convenient, I think, to have an SQLFORM.grid import button that imported what the export button exports (csv). Granted that the admin interface can be used for this, but for a couple of my tables it'd be handy to be able to enable an import button if, say, the table is empty.

[web2py] define_table: table already exists

2012-05-19 Thread Jonathan Lundell
In case someone runs into this... I switched an app installation from SQLite to MySQL recently, and my first define_table complained that the table already existed. Bonus confusion: the new auth tables got defined just fine. Turned out that the problem was that the define_table call was using t

[web2py] Server setup problem

2012-05-19 Thread Marian Siwiak
Hello again, I have a problem with deploying my application. I have set up apache2 server with mod_wsgi on my machine (It runs on debian 6.0.4). The change I made was to use /var/ww instead of /users/www-data folder. Everything went smoothly, as described in web2py online book, but when typing

Re: [web2py] How to get the selected menu / active menu ?

2012-05-19 Thread Sebastian E. Ovide
could tuning the CSS (see web2py-menu-active) help ? On Sat, May 19, 2012 at 1:22 PM, François Delpierre < francois.delpie...@gmail.com> wrote: > Hi, > > Here is my solution : > If my response.menu is somthing like : > > response.menu = [('Menu1', False), ('Menu2', True), ('Menu3', False)] > >

[web2py] Re: Is there anyone who running web2py application on Redhat openshift?

2012-05-19 Thread Andrew
Glad to hear it! =] I'll post my application file to the openshift forums and see if that helps them get a skeleton up on github for web2py. Andrew On Saturday, May 19, 2012 5:44:31 AM UTC-5, JungHyun Kim wrote: > > Andrew!! > > It works !!! > > Two things were keys. > > 1. setting gluon modul

Re: [web2py] Re: error deleting a row if the file uploaded is missing?

2012-05-19 Thread Sebastian E. Ovide
done. http://code.google.com/p/web2py/issues/detail?id=809 On Mon, May 14, 2012 at 2:50 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Please open a ticket with the traceback. This needs to be fixed quick. > > > On Sunday, 13 May 2012 03:27:54 UTC-5, sebastian wrote: >> >> Hi All, >

[web2py] Re: Server setup problem

2012-05-19 Thread Niphlod
it seems that apache doesn'0t understand to pass page rendering to mod_wsgi and instead offers the default behaviour (list and send file). Without further details it's quite impossible make some other assumptions... Il giorno sabato 19 maggio 2012 17:28:26 UTC+2, Marian Siwiak ha scritto: > > He

[web2py] Re: how to see line number or errors in my own module

2012-05-19 Thread Niphlod
it's a known issue with the custom importer you could after all debug in "the old way" inserting print statements here and there in your module to see where execution stops. Il giorno sabato 19 maggio 2012 12:00:45 UTC+2, sebastian ha scritto: > > Hi All, > > In my controller I'm importing m

[web2py] Re: Bootstrap and custom forms and widgets

2012-05-19 Thread Niphlod
me too, but in a different way. I'm working on an app and waiting for web2py 2.0 to release it to the public. It contains a function able to serialize form in "bootstrap" styles (i.e. form-horizontal, form-vertical, form-inline) With some additional work maybe that could be included to prov

[web2py] Re: how to remove from the foo.xml reply?

2012-05-19 Thread Niphlod
just remind that with views you can output what you wantweb2py's templating language poses no limits at all. Il giorno venerdì 18 maggio 2012 23:05:23 UTC+2, bob ha scritto: > > Thanks for the pointer. A quick solution was to mod the generic.xml and > add a key='something' to change the ro

[web2py] Re: Server setup problem

2012-05-19 Thread Marian Siwiak
Ok. That was helpful. Probably problem is with configuration in /etc/apache2/sites-available one question - online book says to make special web2py file, while cookbook says to modify default file. neither of 2 approaches seem to work... is there anything wrong with those examples they presen

[web2py] Re: How to get the selected menu / active menu ?

2012-05-19 Thread Niphlod
if it is a styling problem, you can do that with javascript, after all, the a link with href == document.location it's the active link. if it's a "optimize my python code" you're going to cycle fully the response.menu list with that method. if the active page is the first on the list, you could

Re: [web2py] Re: Server setup problem

2012-05-19 Thread Jonathan Lundell
On May 19, 2012, at 9:58 AM, Marian Siwiak wrote: > Ok. That was helpful. Probably problem is with configuration in > /etc/apache2/sites-available > > one question - online book says to make special web2py file, while cookbook > says to modify default file. > neither of 2 approaches seem to wo

Re: [web2py] Re: Server setup problem

2012-05-19 Thread Marian Siwiak
ok. now I'm at invalid request level. below I attach my config file. I would appreciate pointing what's wrong with that: ServerName nexus.ibb.waw.pl WSGIDaemonProcess web2py user=www-data group=www-data \ display-name=%{GROUP} WSGIProcessGroup web2py WSGIScrip

[web2py] janrain dynamic hostname in url

2012-05-19 Thread rjmolesa
How can I get the host name that web2py is running on so that I can simply deploy a janrain enabled app without editing db.py each time auth.settings.login_form = RPXAccount(request, api_key='...', domain='...', url = "http://"; + application.hostname + "/%s/default/user/login" % request.appl

Re: [web2py] Re: Server setup problem

2012-05-19 Thread Jonathan Lundell
On May 19, 2012, at 10:15 AM, Marian Siwiak wrote: > ok. now I'm at invalid request level. > below I attach my config file. I would appreciate pointing what's wrong with > that: It looks basically OK to me. I suppose you've verified that /var/www/web2py/wsgihandler.py really is the path to that

[web2py] Re: janrain dynamic hostname in url

2012-05-19 Thread Anthony
Try url = URL('default', 'user', args='login', host=True, scheme=True) That will construct a URL including the current host and the current scheme (i.e., http or https). More generally, the current host can be found in request.env.http_host, and the current scheme in request.env.wsgi_url_schem

Re: [web2py] Re: janrain dynamic hostname in url

2012-05-19 Thread Jon Molesa
BOOM! Much thanks. I have changed it to read: auth.settings.login_form = RPXAccount(request, api_key='...', domain='...', url = URL('default', 'user', args='login', host=True, scheme=True) + "/%s/default/user/login" % request.application) and it's working! On Sat, May 19, 2012 at 2:23 PM, Anthon

[web2py] What to expect in web2py 2.0

2012-05-19 Thread Pystar
I am really curious at what features to expect in web2py version 2.0 and when it would be released? Anyone? Massimo?

[web2py] Re: Threads with homemade task queues

2012-05-19 Thread Massimo Di Pierro
Not all all. A backgrund process can create processes and thread and spawn processes as needed. (with the limitations summarized here and discussion below: http://www.reddit.com/r/Python/comments/tpixc/ive_spent_the_past_week_tracking_down_a_bug_in/) The restriction I taked about applies only

[web2py] Re: Add count in db.parse_as_rest output

2012-05-19 Thread Massimo Di Pierro
yes please. Following this mailing list is getting more and more difficult and number of posts increases. On Friday, 18 May 2012 17:26:22 UTC-5, howesc wrote: > > you could submit a patchit's more likely to get massimo to grab a > patch. :) > > On Friday, May 18, 2012 1:06:55 AM UTC-7, Jose

[web2py] Re: nginx+uWSGI+Web2Py for Ubuntu Precise 12.04

2012-05-19 Thread Massimo Di Pierro
can you please open an issue in google code and link your patch there. I will go in. On Friday, 18 May 2012 11:01:15 UTC-5, orsomannaro wrote: > > I made some modify to setup-web2py-nginx-uwsgi-ubuntu.sh script to fit > it to Ubuntu Precise 12.04. > > Differences with the previous script: > >

Re: [web2py] Re: Server setup problem

2012-05-19 Thread Marian Siwiak
> > > It looks basically OK to me. I suppose you've verified > that /var/www/web2py/wsgihandler.py really is the path to that file? > > Also, do you see that file, and only that file, from sites-enabled? > Thanks for the interest. Path is ok. It's the only file, however, I had to name link 000-

[web2py] Re: web2py + Rocket server SSL is vulnerable

2012-05-19 Thread Massimo Di Pierro
I will need your help understand this report. If I understand it: > Session resumption No (IDs assigned but not accepted) This is not a vulnerability. Am I right? This is good because sessions are managed at web2py level. > BEAST attack Vulnerable INSECURE > Secure Renegotiation Supported, w

[web2py] Re: Where do we submit book errata?

2012-05-19 Thread Massimo Di Pierro
On Friday, 18 May 2012 20:44:54 UTC-5, Anthony wrote: > > SSL page missing on http://web2py.com/books/default/chapter/29/13 >> >> "generate your own self-signed certificates following the instructions in >> ref." >> >> link broken: [openssl] >> http://web2py.com/books/default/reference/29/openssl

[web2py] Re: SQLFORM.grid import

2012-05-19 Thread Massimo Di Pierro
I'd take a patch. There may be some issues I have not though of. On Saturday, 19 May 2012 09:27:53 UTC-5, Jonathan Lundell wrote: > > It'd be convenient, I think, to have an SQLFORM.grid import button that > imported what the export button exports (csv). Granted that the admin > interface can be

[web2py] Re: What to expect in web2py 2.0

2012-05-19 Thread Massimo Di Pierro
Basically the same features we have in trunk now. Just lots of bug fixes compared to latest table. We will also have full versining, geo api in db, possibly better support for mongodb and sybase, and a new welcome app based on bootstrap (and this is holding up more than anything else). massimo

Re: [web2py] Re: SQLFORM.grid import

2012-05-19 Thread Jonathan Lundell
On May 19, 2012, at 1:06 PM, Massimo Di Pierro wrote: > I'd take a patch. There may be some issues I have not though of. I can look at it. I expect I'd just crib from the admin code. > > On Saturday, 19 May 2012 09:27:53 UTC-5, Jonathan Lundell wrote: > It'd be convenient, I think, to have an SQ

[web2py] Re: How to get the selected menu / active menu ?

2012-05-19 Thread François Delpierre
Thanks Niphlod, Yes, it's more 'tune my code' is it's perfectly working, and it keeps very fast. The problem with the javascript version is that I want to have the Translated name of the menu not just the link. My previous version is buggy when you're not logged in. So, I had to adapt : {{

[web2py] Re: How to get the selected menu / active menu ?

2012-05-19 Thread François Delpierre
Thanks Niphlod, Yes, it's more 'tune my code' is it's perfectly working, and it keeps very fast. The problem with the javascript version is that I want to have the Translated name of the menu not just the link. My previous version is buggy when you're not logged in. So, I had to adapt : {{

Re: [web2py] Re: Server setup problem

2012-05-19 Thread Jonathan Lundell
On May 19, 2012, at 12:47 PM, Marian Siwiak wrote: > It looks basically OK to me. I suppose you've verified that > /var/www/web2py/wsgihandler.py really is the path to that file? > > Also, do you see that file, and only that file, from sites-enabled? > > Thanks for the interest. Path is ok. It's

Re: [web2py] Re: Server setup problem

2012-05-19 Thread Marian Siwiak
I quit trying to modify anything and used default settings. I used a script: http://code.google.com/p/web2py/source/browse/scripts/setup-web2py-ubuntu.sh and it worked. Thanks a lot for help! Cheers! Marian W dniu sobota, 19 maja 2012 22:18:07 UTC+2 użytkownik Jonathan Lundell napisał: > >

Re: [web2py] Re: Server setup problem

2012-05-19 Thread Jonathan Lundell
On May 19, 2012, at 1:21 PM, Marian Siwiak wrote: > I quit trying to modify anything and used default settings. > I used a script: > http://code.google.com/p/web2py/source/browse/scripts/setup-web2py-ubuntu.sh > and it worked. > Good. The script does more than I want (I'm automating in a Fabri

[web2py] Re: What to expect in web2py 2.0

2012-05-19 Thread Pystar
+1 for the mongodb support, I am playing with the version in trunk and I really prefer the use of bootstrap css. So when is the release date? On Saturday, May 19, 2012 9:10:13 PM UTC+1, Massimo Di Pierro wrote: > > Basically the same features we have in trunk now. Just lots of bug fixes > compar

Re: [web2py] Re: web2py + Rocket server SSL is vulnerable

2012-05-19 Thread Michele Comitini
Yes rocket just implements SSL using the default python ssl module. There is some deprecated SSL connection type allowed. Those should be disabled by default. mic Il giorno 19/mag/2012 21:48, "Massimo Di Pierro" ha scritto: > I will need your help understand this report. > > If I understand it

[web2py] Official site down?

2012-05-19 Thread Vasileios Lourdas
Is the official site down at this moment?

Re: [web2py] Add count in db.parse_as_rest output

2012-05-19 Thread Joseph Piron
No problem, I'll send you a diff patch :) Thanks ! On 19 May 2012, at 21:42, Massimo Di Pierro wrote: > yes please. Following this mailing list is getting more and more difficult > and number of posts increases. > > On Friday, 18 May 2012 17:26:22 UTC-5, howesc wrote: > you could submit a pat

[web2py] Re: Official site down?

2012-05-19 Thread Pystar
yes, its down for me On Saturday, May 19, 2012 9:48:02 PM UTC+1, Vasileios Lourdas wrote: > > Is the official site down at this moment? >

Re: [web2py] Re: Official site down?

2012-05-19 Thread Vasile Ermicioi
yes, it is down http://i.imgur.com/v0TAQ.png

[web2py] Re: Official site down?

2012-05-19 Thread Anthony
500 server error returned by apache. On Saturday, May 19, 2012 4:48:02 PM UTC-4, Vasileios Lourdas wrote: > > Is the official site down at this moment? >

[web2py] Re: What to expect in web2py 2.0

2012-05-19 Thread Massimo Di Pierro
We do not have one. I think we should be done by the end of june, perhaps sooner. On Saturday, 19 May 2012 15:26:49 UTC-5, Pystar wrote: > > +1 for the mongodb support, I am playing with the version in trunk and I > really prefer the use of bootstrap css. So when is the release date? > > On Satu

[web2py] Re: Official site down?

2012-05-19 Thread Massimo Di Pierro
Sorry I was working on it. Up now. On Saturday, 19 May 2012 16:40:09 UTC-5, Anthony wrote: > > 500 server error returned by apache. > > On Saturday, May 19, 2012 4:48:02 PM UTC-4, Vasileios Lourdas wrote: >> >> Is the official site down at this moment? >> >

Re: [web2py] Re: janrain dynamic hostname in url

2012-05-19 Thread Anthony
> > url = URL('default', 'user', args='login', host=True, scheme=True) + > "/%s/default/user/login" % request.application) > URL('default', 'user', args='login', host=True, scheme=True) alone will produce http://yourdomain.com/yourapp/default/user/login, so there should be no need to add "/%s

[web2py] Re: What to expect in web2py 2.0

2012-05-19 Thread Pystar
fingers crossed. On Saturday, May 19, 2012 10:49:30 PM UTC+1, Massimo Di Pierro wrote: > > We do not have one. I think we should be done by the end of june, perhaps > sooner. > > On Saturday, 19 May 2012 15:26:49 UTC-5, Pystar wrote: >> >> +1 for the mongodb support, I am playing with the version

[web2py] ubuntu 11.10 LTS not connecting to postgres

2012-05-19 Thread weheh
We just migrated a web2py app to a new server running ubuntu 11.10 LTS. We are running with ngingx. We are supposed to have psycopg2 installed. Yet, the app that used to work with postgres is now complaining that it can't connect. Here's the ticket: Traceback (most recent call last): File "/h

[web2py] Re: ubuntu 11.10 LTS not connecting to postgres

2012-05-19 Thread weheh
forgot to mention it's running on web2py Version 1.99.7 (2012-03-04 22:12:08) stable

Re: [web2py] Re: ubuntu 11.10 LTS not connecting to postgres

2012-05-19 Thread Khalil KHAMLICHI
check connection to db from the shell first. On Sat, May 19, 2012 at 11:43 PM, weheh wrote: > forgot to mention it's running on web2py Version 1.99.7 (2012-03-04 > 22:12:08) stable >

Re: [web2py] Re: nginx uwsgi error 502 bad gate way

2012-05-19 Thread Lewis
Thanks to Bruce Wade who suggested going all command line. In an init file with an args variable it is no problem to have a very long list of args. Roberto: I used pip to install v 1.2.3. Would it have included xml support by default? I had previously downloaded the package for xml but pe

Re: [web2py] Re: how to see line number or errors in my own module

2012-05-19 Thread Sebastian E. Ovide
oo... by known bug you mean that there is a ticket for it ? On Sat, May 19, 2012 at 5:43 PM, Niphlod wrote: > it's a known issue with the custom importer > > you could after all debug in "the old way" inserting print statements here > and there in your module to see where execution stops. >

Re: [web2py] Re: What to expect in web2py 2.0

2012-05-19 Thread Sebastian E. Ovide
will it break back compatibility with web2py 1.x ? On Sat, May 19, 2012 at 11:33 PM, Pystar wrote: > fingers crossed. > > > On Saturday, May 19, 2012 10:49:30 PM UTC+1, Massimo Di Pierro wrote: >> >> We do not have one. I think we should be done by the end of june, perhaps >> sooner. >> >> On Sa

Re: [web2py] Re: janrain dynamic hostname in url

2012-05-19 Thread Jon Molesa
Thank you. On Sat, May 19, 2012 at 6:17 PM, Anthony wrote: >> url = URL('default', 'user', args='login', host=True, scheme=True) + >> "/%s/default/user/login" % request.application) > > > URL('default', 'user', args='login', host=True, scheme=True) alone will > produce http://yourdomain.com/youra

[web2py] Re: ubuntu 11.10 LTS not connecting to postgres

2012-05-19 Thread Massimo Di Pierro
was fixed trunk. self.driver = drivers.get('pg8000') should be self.driver = self.drivers.get('pg8000') On Saturday, 19 May 2012 17:37:54 UTC-5, weheh wrote: > > We just migrated a web2py app to a new server running ubuntu 11.10 LTS. We > are running with ngingx. We are supposed to have psyco

Re: [web2py] Re: What to expect in web2py 2.0

2012-05-19 Thread Massimo Di Pierro
of course not. On Saturday, 19 May 2012 18:31:25 UTC-5, sebastian wrote: > > will it break back compatibility with web2py 1.x ? > > On Sat, May 19, 2012 at 11:33 PM, Pystar wrote: > >> fingers crossed. >> >> >> On Saturday, May 19, 2012 10:49:30 PM UTC+1, Massimo Di Pierro wrote: >>> >>> We do no

[web2py] Re: How to use web2py DAL with sybase? Update

2012-05-19 Thread dlypka
Hi: FYI - we did a lot of work to setup the corporate sybase environment and successfully connected to sybase using the sybase client tools Thursday night. And we installed and tested the web2py Welcome app on the corporate laptop. We expect to start trying the web2py sybase adapter on Monday.

Re: [web2py] Re: web2py + Rocket server SSL is vulnerable

2012-05-19 Thread Massimo Di Pierro
I believe these vulnerabilities are fixed by this recent python 2.7 patch: http://bugs.python.org/issue13636 Can you confirm? On Saturday, 19 May 2012 15:37:26 UTC-5, mcm wrote: > > Yes rocket just implements SSL using the default python ssl module. There > is some deprecated SSL connection ty

Re: [web2py] Re: 75€ BOUNTY - Massively Complicated Query Required

2012-05-19 Thread Jason Brower
It is not totally implemented or verified at this point. But so far it seems to be working. I will post the answer later along with a special module I also made that uses this method. I think you guys will like it. BR, Jason Brower On 05/18/2012 09:15 PM, Carlos Costa wrote: The answer? 20