[web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-09-26 Thread Jose C
Nope. A leaking web2py will have worried a lot of users if shows up in a simple app like this (i.e. if it leaks while processing this app, the bases of the web2py code are leaking somewhere and everyone would have noticed that) You'd expect so... although not sure how many users have apps

[web2py] Return Compile error

2012-09-26 Thread Hassan Alnatour
Dear ALL, I am trying to return a div that has a select with option from table , but am getting an error , and i still cant figure it out , any help please ? return DIV( LABEL('%s: ' % table[column].label,_for=column), DIV(SELECT( #OPTION('None',_value=''), for

Re: [web2py] Return Compile error

2012-09-26 Thread hasan alnator
return ''' div class='clearfix' label for=%s%s: /label div class=input select {{for i in db().select(db.News.ALL):}} option value={{=i.id}}{{i.EnglishTitle}}/option {{pass}} /select /div /div ''' % (column,table[column].label,) On Wed, Sep 26, 2012 at 11:30 AM, Hassan Alnatour

[web2py] Re: routes_onerror

2012-09-26 Thread lyn2py
Opened an issue here: Issue 1034 http://code.google.com/p/web2py/issues/detail?id=1034 On Wednesday, September 26, 2012 11:16:16 AM UTC+8, Massimo Di Pierro wrote: Please open a ticket about this. On Tuesday, 25 September 2012 21:36:57 UTC-5, lyn2py wrote: Can't use it in an app-specicfic

Re: [web2py] Re: Cannot login via web2py mobile admin (V 2.0.6)

2012-09-26 Thread Johann Spies
On 25 September 2012 16:37, Oli oliver.fr...@gmx.net wrote: I also have the same Problem with Samsung SII. And with the Motorola Razr XT910. I also cannot login into a normal app using the cellphone when using the navbar. However when going to a function that requires authentication, the

[web2py] Re: Sqlite adapter date and datetime type validation

2012-09-26 Thread Alan Etkin
El martes, 25 de septiembre de 2012 15:09:07 UTC-3, Massimo Di Pierro escribió:The driver should. but it does not. I guess we can catch at the adapter level. Then, I guess this not a web2py issue but a feature not implemented in the db engine specific interface. For solving that, there would

Re: [web2py] How to get geo location?

2012-09-26 Thread Manuele Pesenti
Il 26/09/2012 04:38, weheh ha scritto: I want to play around with geo location stuff. Is there a simple way to get the location of the user's browser when they access a controller/action within web2py? I'm not trying to convert an address to a geo location. I'm looking for lat/long info from

Re: [web2py] Re: Problems with a validation procedure ? - a Canadian postal code !

2012-09-26 Thread Le Don X
don't be sorry for jumping in it is appreciated ! .. and refreshing to noticed that there are canadian folks like me on here ! to resume ... from all the responses received - the best canadian postal code validation is actually the one submitted by Adnan : this one :

[web2py] Apache Error Please Help

2012-09-26 Thread Hassan Alnatour
[Wed Sep 26 06:29:38 2012] [error] [client 127.0.0.1] mod_wsgi (pid=3648): Target WSGI script 'C:/web2py/wsgihandler.py' cannot be loaded as Python module. [Wed Sep 26 06:29:38 2012] [error] [client 127.0.0.1] mod_wsgi (pid=3648): Exception occurred processing WSGI script

[web2py] Re: No module named webclient

2012-09-26 Thread weheh
I don't have login permissions on the doc any longer but I could clean up a few typos if you'll give access again. On Wednesday, September 26, 2012 11:16:58 AM UTC+8, Massimo Di Pierro wrote: yes. requires 2.0.x On Tuesday, 25 September 2012 21:45:04 UTC-5, weheh wrote: Using web2py

[web2py] Re: Apache Error Please Help

2012-09-26 Thread Paolo Caruccio
apache version? mod_wsgi version? Il giorno mercoledì 26 settembre 2012 13:31:23 UTC+2, Hassan Alnatour ha scritto: [Wed Sep 26 06:29:38 2012] [error] [client 127.0.0.1] mod_wsgi (pid=3648): Target WSGI script 'C:/web2py/wsgihandler.py' cannot be loaded as Python module. [Wed Sep 26

[web2py] Book Web2py Portuguese not work

2012-09-26 Thread Ovidio Marinho
menu book of web2py web2py Portuguese menu is that this is not working. http://web2py.com/books/default/chapter/37 Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.br ITJP - itjp.net.br

Re: [web2py] Book Web2py Portuguese not work

2012-09-26 Thread Bruno Rocha
Portuguese translation is a work in progress, we are doing the work on github.com/rochacbruno Bruno Rocha http://rochacbruno.com.br mobile Em 26/09/2012 09:27, Ovidio Marinho ovidio...@gmail.com escreveu: menu book of web2py web2py Portuguese menu is that this is not working.

[web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-09-26 Thread Niphlod
tests are done with a simple hello, world app. Cases 1-3 differs from having session enabled or not. Case 5 is done with a hacked gluon/main.py version. So case 1 should reproduce the same behaviour the author described (standard web2py, session enabled). None of them showed any memory leak. A

[web2py] Re: Return Compile error

2012-09-26 Thread Niphlod
you can't cycle db results within a tag as SELECT() Il giorno mercoledì 26 settembre 2012 10:30:53 UTC+2, Hassan Alnatour ha scritto: Dear ALL, I am trying to return a div that has a select with option from table , but am getting an error , and i still cant figure it out , any help please

[web2py] How to reload a div containing a component

2012-09-26 Thread Johann Spies
I have this view: {{extend 'layout.html'}} div class=row div class=span7 {{=opskrif}} {{=vorm}} /div div class=span5 {{=skakel}} /div /div div class=span12 {{=LOAD('authors', 'list_chosen_authors.load', ajax=True)}} input id=Button1

[web2py] Re: web2py 2.0.8 Firebird driver fdb error

2012-09-26 Thread Adrian Marius Popa
On Wednesday, September 12, 2012 3:43:15 PM UTC+3, Massimo Di Pierro wrote: Please open a ticket about this. On Wednesday, 12 September 2012 07:06:33 UTC-5, Alexei Vinidiktov wrote: I'm trying to use the new fdb driver for Firebird with web2py 2.0.8 but I'm getting this error when I load

[web2py] Re: How to reload a div containing a component

2012-09-26 Thread Anthony
div class = herlaai_pubvelde{{=LOAD('authors', 'publikasievelde.load', ajax=True)}}/div div class = herlaai_personeel{{=LOAD('default', 'personeel.load', ajax =True)}}/div div class = herlaai_nrf{{=LOAD('default', 'nrfdata.load', ajax=True )}}/div script type=text/javascript

Re: [web2py] Re: How to reload a div containing a component

2012-09-26 Thread Johann Spies
On 26 September 2012 15:37, Anthony abasta...@gmail.com wrote: First, your divs are identified via classes, but your jQuery selectors are for id's. You probably want to change the classes to id's: div id=herlaai_pubvelde{{=LOAD('authors', 'publikasievelde.load', ajax=True)}}/div Thanks

[web2py] Re: Apache Error Please Help

2012-09-26 Thread Massimo Di Pierro
I think you have an invalid router configuration. Can you show it to us? It mentions ward but web2py says you do not have a ward app. It may be a typo in routes.py or a PATH issue. On Wednesday, 26 September 2012 06:31:23 UTC-5, Hassan Alnatour wrote: [Wed Sep 26 06:29:38 2012] [error]

Re: [web2py] Re: How to reload a div containing a component

2012-09-26 Thread Anthony
On Wednesday, September 26, 2012 9:50:59 AM UTC-4, Johann Spies wrote: On 26 September 2012 15:37, Anthony abas...@gmail.com javascript:wrote: First, your divs are identified via classes, but your jQuery selectors are for id's. You probably want to change the classes to id's: div

[web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-09-26 Thread Massimo Di Pierro
First of all kudos to Andriy, He created an excellent testing code, he was very responsive, and he really took the time to understand some of the web2py code. Moreover he is the author of the excellent wheezy.web framework. He just emailed me that he has rebuilt his testing environment and has

Re: [web2py] Re: Apache Error Please Help

2012-09-26 Thread hasan alnator
Dear Massimo , the app ward wasn't there , so that was making an error . thank you i fixed everything now .. Regards, On Wed, Sep 26, 2012 at 4:53 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I think you have an invalid router configuration. Can you show it to us? It mentions

[web2py] Re: Starting a simple project from scratch

2012-09-26 Thread Vixus
Hi, thanks for your reply! What about the rest of the files? Can I make my own layout.html and default.py from scratch? I was struggling to find all the details on the auth object in the documentation and also what the gluon module is and how to use it. default.py doesn't seem to have any

[web2py] Setting session vars without a form submit

2012-09-26 Thread Maya Iyengar
Hi, I'm trying to set some defaults for the user based on their user id, which needs to be set at the beginning of each session. The user may or may not need to login (based on whether or not they've selected Remember me for 30 days. So where is the best place for me to put the logic that sets

[web2py] Re: Setting session vars without a form submit

2012-09-26 Thread Massimo Di Pierro
if auth.user and not session.defaults: session.defaults = {} then use session.defaults as a dict On Tuesday, 25 September 2012 18:19:11 UTC-5, Maya Iyengar wrote: Hi, I'm trying to set some defaults for the user based on their user id, which needs to be set at the beginning of each

[web2py] Re: Starting a simple project from scratch

2012-09-26 Thread Massimo Di Pierro
You can delete all of web2py files in an app and make your own. The controllers (in your case default.py) is executed in the same environment as the models, therefore it see all the variables defined in the models (in web2py that is what models are for: they build the environment for the

Re: [web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-09-26 Thread Alec Taylor
On Thu, Sep 27, 2012 at 12:12 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: First of all kudos to Andriy, He created an excellent testing code, he was very responsive, and he really took the time to understand some of the web2py code. Moreover he is the author of the excellent

[web2py] Version 2.09 wipes source files

2012-09-26 Thread chicks
Updated from 1.99 to 2.09 yesterday. Everything looked fine until started editing via the web GUI. Every edit overwrites the edited file with undefined when saved. Reverting back to 1.99. Anyone else seeing this issue? Running on Solaris, Python 2.7. --

Re: [web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-09-26 Thread Massimo Di Pierro
We should definitively try to understand and improve these results but I am not convinced that matching the speed of others on hello world benchmarks should be a goal. This just says to me that others do very little for you beyond the web server. If you turn on sessions and templates in other

Re: [web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-09-26 Thread Bruno Rocha
Should we forfeit these checks because others do not do them and we want to appear faster in the benchmarks? I say no. +1 I completely agree with this. After some months working with another framework I say that the speed issues is not a problem compared to the hard way of getting things

Re: [web2py] Version 2.09 wipes source files

2012-09-26 Thread Richard Vézina
How do you update? Which 1.99 version 1.99.7? Richard On Wed, Sep 26, 2012 at 12:29 PM, chicks sea@gmail.com wrote: Updated from 1.99 to 2.09 yesterday. Everything looked fine until started editing via the web GUI. Every edit overwrites the edited file with undefined when saved.

[web2py] Re: Version 2.09 wipes source files

2012-09-26 Thread Massimo Di Pierro
Is it possible your browser was caching the old js libraries with the new admin? If not, what browser are you using? massimo On Wednesday, 26 September 2012 11:29:50 UTC-5, chicks wrote: Updated from 1.99 to 2.09 yesterday. Everything looked fine until started editing via the web GUI.

[web2py] Re: Forms - MVC model

2012-09-26 Thread MichaelF
I'm still struggling with the lines of control/authority/info-sharing between displaying/processing the data/form. (I realize not everyone agrees where these lines should be drawn, and even when drawn they're not necessarily sharp, bright lines.) I like the idea of having the controller simply

Re: [web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-09-26 Thread Ovidio Marinho
This is a web development or a comparison with the fastest formula 1, or rifle which has the largest capacity of distance. Comparison baseless Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.br

[web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-09-26 Thread Marin Pranjić
This benchmark is useless. Why don't we make a benchmark with more complex app? Marin --

Re: [web2py] framework benchmarks - web2py surprisingly slow?

2012-09-26 Thread Massimo Di Pierro
Good point. Forwarding to the mailing list. Feel free join, even only to pitch in this discussion. On the web2py list we do not mind learning more about new frameworks. Massimo On Sep 26, 2012, at 1:36 PM, Andriy Kornatskyy wrote: Massimo, Let me please add my two cents as to why simple

Re: [web2py] Re: Problems with a validation procedure ? - a Canadian postal code !

2012-09-26 Thread Richard Vézina
You can may use .capitalize() before the vars get validated by validators. I thought that there was a way to do action before the form get validated, but I can't find in the book, something like beforevalidation, instead of onvalidation that is provided. I think that if beforevalidation doesn't

Re: [web2py] Version 2.09 wipes source files

2012-09-26 Thread chicks
Updated by unzipping the source file. Don't recall exactly which 1.99 version, downloaded / installed on May 8. On Wednesday, September 26, 2012 10:18:44 AM UTC-7, Richard wrote: How do you update? Which 1.99 version 1.99.7? Richard On Wed, Sep 26, 2012 at 12:29 PM, chicks

[web2py] Re: Version 2.09 wipes source files

2012-09-26 Thread chicks
Just restarted the browser (IE9 on Win7), cleared the cache, still wipes out the source files upon edit/save. Reverting back to 1.99 for now... On Wednesday, September 26, 2012 10:24:38 AM UTC-7, Massimo Di Pierro wrote: Is it possible your browser was caching the old js libraries with the

[web2py] Re: global name 'db' is not defined

2012-09-26 Thread Роман Акимов
понедельник, 24 сентября 2012 г., 23:51:21 UTC+6 пользователь Massimo Di Pierro написал: db should be defined in your models/db.py db= DAL() Models are executed in alphabetical order. It will not be there for you if you deleted db.py or name your model so that it is executed before

[web2py] Re: Version 2.09 wipes source files

2012-09-26 Thread Massimo Di Pierro
Can anybody else reproduce this? I do not have IE9 nor Win7. On Wednesday, 26 September 2012 12:34:18 UTC-5, chicks wrote: Just restarted the browser (IE9 on Win7), cleared the cache, still wipes out the source files upon edit/save. Reverting back to 1.99 for now... On Wednesday, September

[web2py] Re: global name 'db' is not defined

2012-09-26 Thread Massimo Di Pierro
Crud.update should be crud.update crud an object which belongs to class Crud. On Wednesday, 26 September 2012 12:16:25 UTC-5, Роман Акимов wrote: понедельник, 24 сентября 2012 г., 23:51:21 UTC+6 пользователь Massimo Di Pierro написал: db should be defined in your models/db.py db=

Re: [web2py] Re: Problems with a validation procedure ? - a Canadian postal code !

2012-09-26 Thread Massimo Di Pierro
Yes. you can do: import re from gluon.validator import Validator class CANADIAN_ZIP(Validator): regex = re.compile('^[ABCEGHJKLMNPRSTVXY]{1}\d{1}[A-Z]{1} *\d{1}[A-Z]{1}\d{1}$') def __init__(self,error_message='invalid!): self.error_message = error_message def

Re: [web2py] Re: Problems with a validation procedure ? - a Canadian postal code !

2012-09-26 Thread Richard Vézina
:) Richard On Wed, Sep 26, 2012 at 3:25 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Yes. you can do: import re from gluon.validator import Validator class CANADIAN_ZIP(Validator): regex = re.compile('^[ABCEGHJKLMNPRSTVXY]{1}\d{1}**[A-Z]{1} *\d{1}[A-Z]{1}\d{1}$')

[web2py] How to queue emails with attachments using the Scheduler?

2012-09-26 Thread Martin Weissenboeck
I want to use the Scheduler for sending emails. Everything works fine, but I cannot use an Attachment: I use json.dumps for the var field of scheduler_task, but json.dumps cannot convert an Attachment. Next try: pickle.dumps hides the attachment and json.dumps accepts this:

[web2py] Re: Starting a simple project from scratch

2012-09-26 Thread Vixus
Thanks very much! I'll make sure to read the book through as well. On Wednesday, September 26, 2012 5:13:28 PM UTC+1, Massimo Di Pierro wrote: You can delete all of web2py files in an app and make your own. The controllers (in your case default.py) is executed in the same environment as the

[web2py] Re: Strange quirks with GAE

2012-09-26 Thread Pystar
Yes, I found that out. It works for me. Only (1) which is sending mails generated from the template doesnt. On Wednesday, September 26, 2012 12:36:15 AM UTC+1, howesc wrote: i use GAE to send mail daily i have neither of these problems. there must be something amuck somewhere... re #2,

[web2py] Re: Forms - MVC model

2012-09-26 Thread Anthony
When you build a form object in the controller, although you may make some specifications that control its display, you are primarily defining a data model for the form. The form object itself is not merely an HTML DOM representation but also encapsulates the default and submitted values,

[web2py] Re: How to queue emails with attachments using the Scheduler?

2012-09-26 Thread Niphlod
everything going to scheduler must be jsonifiable. Can you use the attachment parameters pointing to a physical file (as '/yourapp/private/something.png') and in your send_mail function retrieve the path and initialize an attachment ? A string is definitely jsonifiable e.g. def

[web2py] Re: Version 2.09 wipes source files

2012-09-26 Thread LightDot
I just did a quick test using IE9 on Windows 7 and I can't reproduce. I was editing the source on Scientific Linux 6.3 / Apache, I don't have a Solaris machine available. I did not do an upgrade from 1.99.x to 2.x.x, though, I'm using the latest trunk. @chicks: could you perhaps make a

[web2py] Re: Version 2.09 wipes source files

2012-09-26 Thread Massimo Di Pierro
I am pretty sure this has nothing to do with the server. This is a JS issue. undefined is a JS keyword. On Wednesday, 26 September 2012 15:22:26 UTC-5, LightDot wrote: I just did a quick test using IE9 on Windows 7 and I can't reproduce. I was editing the source on Scientific Linux 6.3 /

[web2py] Re: Forms - MVC model

2012-09-26 Thread MichaelF
That makes sense; thanks. I guess I never looked at it that way. On Wednesday, September 26, 2012 2:02:41 PM UTC-6, Anthony wrote: When you build a form object in the controller, although you may make some specifications that control its display, you are primarily defining a data model for

[web2py] Re: Version 2.09 wipes source files

2012-09-26 Thread chicks
I'm using the embedded Rocket server. Will try another clean install and see what happens. Thanks for the super quick responses on this! Amazing... On Wednesday, September 26, 2012 1:22:26 PM UTC-7, LightDot wrote: I just did a quick test using IE9 on Windows 7 and I can't reproduce. I

[web2py] Re: Version 2.09 wipes source files

2012-09-26 Thread Massimo Di Pierro
When you click save the the function doClickSave in applications/admin/static/js/ajax_editor.js is called. Is loads the data (text to be saved) and make an ajax POST to save it. The text is computed in line 29 in the function getData(). I suspect this function is returning undefined. Perhaps

[web2py] Re: TNS error on Oracle

2012-09-26 Thread Bill Thayer
Just spent 2 days on this error. Using instant client I needed to point ORACLE_HOME and TNS_ADMIN to the instanclient folder and make sure the tnsnames.ora file was inside. On Tuesday, March 6, 2012 8:21:52 AM UTC-6, rochacbruno wrote: Does anybody knows something about this? it connects

[web2py] scheduler cannot detect correct application name

2012-09-26 Thread Vincenzo Ampolo
Hi, I've deployed my application in a server, in the meantime I also changed the application name. To do so I installed web2py, then created a new application using the admin interface and then I copied the content of the directory of the project in the newly created directory. For the db I did

[web2py] Re: scheduler cannot detect correct application name

2012-09-26 Thread Niphlod
it seems a bug within languages, not scheduler. However - just to be sure - when you restored the db, if there was any scheduled_task there? If there was, the column application_name of the table scheduler_task needs to be updated to the new name. On Thursday, September 27, 2012 12:08:59 AM

Re: [web2py] framework benchmarks - web2py surprisingly slow?

2012-09-26 Thread Niphlod
On Thursday, September 27, 2012 12:20:03 AM UTC+2, Massimo Di Pierro wrote: Are you telling us that under heavy load, trying to generate a new session_id at every request using the os entropy generator (/dev/urandom), results in too many files open, causes tickets, and this produces the

Re: [web2py] Re: scheduler cannot detect correct application name

2012-09-26 Thread Vincenzo Ampolo
On 09/26/2012 03:29 PM, Niphlod wrote: it seems a bug within languages, not scheduler. However - just to be sure - when you restored the db, if there was any scheduled_task there? If there was, the column application_name of the table scheduler_task needs to be updated to the new name. No,

Re: [web2py] framework benchmarks - web2py surprisingly slow?

2012-09-26 Thread Michele Comitini
I confirm that is a rocket issue. After a while it starts leaving CLOSE WAIT sockets around until consuming all available file handles. mic 2012/9/27 Niphlod niph...@gmail.com On Thursday, September 27, 2012 12:20:03 AM UTC+2, Massimo Di Pierro wrote: Are you telling us that under heavy

[web2py] potential problem w db.executesql(sql) not updating table when done during onvalidation process

2012-09-26 Thread Adi
My apology if a description of the problem is not concise enough. I am updating record during onvalidaiton process, and this worked until Sep 17. Anything is possible, but I don't remember changing any code in this area. When I run the same SQL statement manually, or from a test procedure,

[web2py] Re: potential problem w db.executesql(sql) not updating table when done during onvalidation process

2012-09-26 Thread Adi
forgot to mention db ver of w2p: MySQL + Version 2.0.9 (2012-09-13 23:51:30) stable On Wednesday, September 26, 2012 8:09:50 PM UTC-4, Adi wrote: My apology if a description of the problem is not concise enough. I am updating record during onvalidaiton process, and this worked until Sep

Re: [web2py] Re: scheduler cannot detect correct application name

2012-09-26 Thread Vincenzo Ampolo
On 09/26/2012 03:29 PM, Niphlod wrote: If there was, the column application_name of the table scheduler_task needs to be updated to the new name. Curious that new tasks still have the old application_name in scheduler_task even if I create them like:

[web2py] How do you I use geo-spatial types in Web2py DAL?

2012-09-26 Thread Calvin
Hi I am a big fan of Web2py and would like to use the DAL for capturing location specific information. I use MySQL as a back-end and would like to understand how I could define a table with MySQL's Spatial Extension data types into the DAL and hopefully be able to access this with SQLFORM. For

[web2py] Manually send confirmation email

2012-09-26 Thread Bruno Codeman
Hi! I'm creating a custom registration form (my registration form have more than one table on db) , but I need to ask the user to confirm by email the registration, clicking on a link. I would like to use the web2py native feature of sending the email and just let the user log in after click

Re: [web2py] Re: How to queue emails with attachments using the Scheduler?

2012-09-26 Thread Martin Weissenboeck
Good idea! I am sorry that I did not find it myself. 2012/9/26 Niphlod niph...@gmail.com everything going to scheduler must be jsonifiable. Can you use the attachment parameters pointing to a physical file (as '/yourapp/private/something.png') and in your send_mail function retrieve the path

[web2py] how to avoid an overhead

2012-09-26 Thread Martin Weissenboeck
I have a fundamental question. Let's say I have a function like def mypage(): form = a_lot_of_calculations_and_db_accesses() if form.process().accepted: do_something() return dict(form=form) The part a_lot_of_calculations_and_db_accesses() runs twice: first time to prepare