RE: [web2py] Re: Converting mongodb collection to row

2011-12-05 Thread Mark Breedveld
Paul Robinson solved it by just inserted the dict from connection['table'].find() in to an overridden parse function. I have to figure out how he exactly did it, but I don't think it will take to long before we have an experimental working mongodb adapter. I'll keep you all posted. Regards Mark,

Re: [web2py] Re: date and sum

2011-12-05 Thread Martín Mulone
Use http://tohtml.com/ to highlight the code you want to show 2011/12/4 Rick sababa.sab...@gmail.com I tried to apply the solution to my code, but it still doesn't work. Here is the code: prerecords = db().select(db.day.ALL, orderby=db.day.thedate)for prerecord in prerecords:

Re: [web2py] Is this a in custom imports?

2011-12-05 Thread Martín Mulone
Interesting, there is some trouble but I coudn't see it. 2011/12/4 Constantine Vasil thst...@gmail.com I managed to transfer a very big app initially developed for Django+GAE+JQuery Mobile to web2py. Managed to set up my Eclipse environment to work with web2py and now I can debug my web2py +

[web2py] problem selecting from field with IS_IN_SET

2011-12-05 Thread thodoris
I have the following featured = (0,1,2,3,4,5) Field('rank','list:integer',requires=IS_IN_SET(featured, zero='rank'), readable=False, writable=False), So this field can only be set from appadmin and is set by default to [] when a record is made, IIUC. I want to select the tables that have been

[web2py] Splitting controllers?

2011-12-05 Thread Ryan DowlingSoka
Hi there! I started creating a website for a game at my college with web2py last winter, and this winter I am cleaning up a lot of the things I did rushed, and making it something that others can use... IE: not so reliant on me creating one time use controllers, or going straight to the shell to

[web2py] Configurar servidor web2py na Linode

2011-12-05 Thread Bruno Barbosa
Pessoal, Estou querendo contratar um plano na Linode para hospedar minha aplicação em web2py. A minha dúvida é que não sei como configurar o servidor lá... Alguém tem alguma experiência ou link de artigos sobre como fazer e poderia compartilhar? -- Bruno Barbosa Web Developer and Free Software

[web2py] oracle error after changing password

2011-12-05 Thread Tim Korb
I changed my Oracle password and updated my web2py DAL connect string, but now get the error: DatabaseError: ORA-00955: name is already used by an existing object Did something get corrupted? Any suggestions on how I can fix it? (I tried restarting the web server.) Here is the full

[web2py] Re: Configurar servidor web2py na Linode

2011-12-05 Thread Alan Etkin
I found this on another thread: http://groups.google.com/group/web2py/browse_thread/thread/5a3cb9154e27c1b/4168b21b051dd342 Adi ... I followed instructions from here: http://www.web2pyslices.com/main/slices/take_slice/14 Worked for me on linode. On Dec 5, 8:43 am, Bruno Barbosa

[web2py] Re: problem selecting from field with IS_IN_SET

2011-12-05 Thread Alan Etkin
Aren't you setting a field constraint that allows only integers from 0 to 5? featured = (0,1,2,3,4,5) IS_IN_SET has a multiple=True/False argument (false by default) that allows to validate sequences of objects (for example [int a, int b, ... int n]) Also you can set a default value in the

[web2py] Re: problem selecting from field with IS_IN_SET

2011-12-05 Thread Alan Etkin
IS_IN_SET has a multiple=True/False argument (false by default) that Sorry, my mistake, multiple is True by default.

[web2py] Re: Splitting controllers?

2011-12-05 Thread Alan Etkin
I think that large python files turn difficult to read (specially if you are contributing to the code) Here are some recommendations for big sites/apps (in spanish) by Martín Mulone: http://www.slideshare.net/martinpm/web2py-pensando-en-grande-9448110 On Dec 5, 4:57 am, Ryan DowlingSoka

[web2py] small book error

2011-12-05 Thread elffikk
http://web2py.com/book/default/chapter/08 please add an 's' to auth.setting.extra_fields['auth_user']= [ Field('address'), Field('city'), Field('zip'), Field('phone')] should be auth.settings

[web2py] Re: oracle error after changing password

2011-12-05 Thread Tim Korb
Oh, I see. Since the password is part of the connect string, the connection string hash used for migrations has changed. Web2py is apparently trying to recreate existing tables, assuming that this is a different database. Correct? I guess I need to read the migration section in the manual

Re: [web2py] Re: oracle error after changing password

2011-12-05 Thread Bruno Rocha
fake_migrate=True http://zerp.ly/rochacbruno Em 05/12/2011 10:37, Tim Korb jtk...@gmail.com escreveu: Oh, I see. Since the password is part of the connect string, the connection string hash used for migrations has changed. Web2py is apparently trying to recreate existing tables, assuming

[web2py] web2py book translation

2011-12-05 Thread Mirek Zvolský
If we will have 4th edition of web2py book, I am interested to translate it (into czech language). Are there some hints, what to do, when I want start with translation?

[web2py] bug reporting

2011-12-05 Thread Mirek Zvolský
Hi, what is the prefferred way, how to report bugs in web2py? And what about reporting of (small) mistakes in manual - web2py book?

Re: [web2py] Re: Splitting controllers?

2011-12-05 Thread Angelo Compagnucci
These slides are really intresting, an english version sould be a must! 2011/12/5 Alan Etkin spame...@gmail.com: I think that large python files turn difficult to read (specially if you are contributing to the code) Here are some recommendations for big sites/apps (in spanish) by Martín

[web2py] Re: Splitting controllers?

2011-12-05 Thread Anthony
I don't see any problem with breaking up your controller if you find it more manageable. Note, if you have utility functions that are needed by multiple controllers, you can also put them in a model file. Or if you prefer modules but want to make your db and auth instances more easily

[web2py] Re: bug reporting

2011-12-05 Thread Anthony
It's usually a good idea to mention bugs here on the list first to confirm it's really a bug -- then submit an issue here: http://code.google.com/p/web2py/issues/list. This is also a good place to report book errors. Anthony

[web2py] Re: problem selecting from field with IS_IN_SET

2011-12-05 Thread Anthony
For a list:integer field, you want to set IS_IN_SET(..., multiple=True) to allow multiple values. Or perhaps you don't really want multiple values, in which case, just make it an 'integer' field. See http://web2py.com/book/default/chapter/06#Many-to-Many,-list:type,-and-contains. With a

[web2py] Re: date and sum

2011-12-05 Thread Anthony
It doesn't look like you applied Massimo's solution. You're calling select() all by itself (not as a method of a Set object) -- doesn't that raise an error (there's no function called 'select' in web2py)? The sum should be applied in the initial query, not on the returned rows after the query.

[web2py] How to deploy web2py on PythonAnywhere

2011-12-05 Thread Bruno Rocha
How to deploy web2py on PythonAnywhere http://stackoverflow.com/a/8386751/559935 -- Bruno Rocha [http://rochacbruno.com.br]

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Anthony
It's best to handle on the client side if you can. The easiest is an IE conditional comment: !--[if IE] put some JS here that makes changes for IE -- it will be run only in IE browsers ![endif]-- You can also check via jQuery: if (jQuery.browser.msie) {do something} Finally, if you

[web2py] Re: problem selecting from field with IS_IN_SET

2011-12-05 Thread Anthony
Right the first time -- multiple defaults to False (though for a list:reference field, by default, an IS_IN_DB validator with multiple=True is applied). Anthony On Monday, December 5, 2011 7:20:20 AM UTC-5, Alan Etkin wrote: IS_IN_SET has a multiple=True/False argument (false by default)

[web2py] Re: web2py book translation

2011-12-05 Thread Massimo Di Pierro
I am working on an app for that. very soon. On Dec 5, 7:41 am, Mirek Zvolský zvol...@seznam.cz wrote: If we will have 4th edition of web2py book, I am interested to translate it (into czech language). Are there some hints, what to do, when I want start with translation?

[web2py] web2py Application Development Cookbook

2011-12-05 Thread António Ramos
Hello, when will this book be available in PacktPub? I preordered it but still waiting for news thank you António

Re: [web2py] Re: Expire date for Web2Py applications

2011-12-05 Thread António Ramos
Also a good idea in the admin is to see the ACL of the app without having to dig deeper in to the table group ,auth,permissions,etc 2011/12/4 Anthony abasta...@gmail.com On Sunday, December 4, 2011 4:12:03 PM UTC-5, Ramos wrote: What about an On/OFF button in admin to disable individualy

[web2py] upload field value reset on form failure of another field

2011-12-05 Thread thodoris
Is there any way to keep the value that was inserted on an upload field after failing to validate the form due to another field, so that the user doesn't have to search for the file again?

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Constantine Vasil
That is great! Thank you both! I want to share my research about web2py + jQuery Mobile - made a lot of tests. The bottom line id as follows. JQuery Mobile is designed for mobile but it turns out it works on desktop too. This is great because one design can work for both mobile and desktop

Re: [web2py] Is this a in custom imports?

2011-12-05 Thread Constantine Vasil
the only way to see it is to recreate the project. Custom imports solves a real speed issue and everything will work much faster so it is worth to do it. But this issue should be resolved. Because the debugger cannot be used it is very hard to detect. I mentioned it because i wanted to hide the

[web2py] Re: upload field value reset on form failure of another field

2011-12-05 Thread Anthony
This is tricky. When the form is submitted, it doesn't send the location of the file on the user's computer -- it sends the actual file. Even if you knew the location of the file on the user's computer, you couldn't pre-populate the form field with that value because browsers won't allow it

[web2py] Re: Using language files from another system folder

2011-12-05 Thread Niphlod
Just my 2 cents: - web2py application and desktop application will probably read the data a lot, updates not so often - additional strings in web2py application gets automagically added to the language files The only doubt remains the one: if you need to add something to language files within

[web2py] Is it possible to intercept the flash message and parse it before appearing to the view?

2011-12-05 Thread Constantine Vasil
I made a flash messages enhancement with two levels 'info' and 'error'. I set up my layout.html to accept {{=flash_level}} and to make the flash message visually different for each case. It works when in my controller I set flash_level = 'info' and send it to the view. web2py has many internal

Re: [web2py] Is this a in custom imports?

2011-12-05 Thread Anthony
Why do you do: self.auth_def = lambda: self.define_auth Anyway, that won't work as expected, because your lambda returns a function instead of calling the function. Also, you might need to add the 'self' parameter to the lambda. Maybe: self.auth_def = lambda self: self.define_auth() But

[web2py] Re: Is it possible to intercept the flash message and parse it before appearing to the view?

2011-12-05 Thread Anthony
The flash message is stored in response.flash. There are a few web2py operations that automatically set that. The actually flashing is handled by JS on the client side (in web2py_ajax.js). Anthony On Monday, December 5, 2011 11:32:22 AM UTC-5, Constantine Vasil wrote: I made a flash messages

[web2py] Re: Using language files from another system folder

2011-12-05 Thread Alan Etkin
The only doubt remains the one: if you need to add something to language files within your desktop app, did you figure how to do that? I have a fake web2py environment in the desktop application and create an ad-hoc T object, so it works as if within web2py (anything wrapped by T updates the

[web2py] Re: upload field value reset on form failure of another field

2011-12-05 Thread Wikus van de Merwe
So how does it work for other form elements? I'm guessing they are stored in session. So the way to go would be to store the uploaded file in session too and then on form resubmission check what to display. If file is in session the input field should look as on update of an existing object

[web2py] Re: upload field value reset on form failure of another field

2011-12-05 Thread Anthony
Other form elements aren't stored in the session -- when the form submission comes in, they are in request.vars, and they can be moved to form.vars and returned with the form (no need to put anything in the session). The file itself, on the other, cannot be returned with the form, so you have

[web2py] running from trunk fails

2011-12-05 Thread Jim Steil
Anyone else having trouble with web2py trunk this morning? A fresh install gets me a ticket and trying to view the ticket results in another ticket. Also get a warning in the console: C:\Deleteme\web2py\gluon\contrib\user_agent_parser.py:379: Warning: 'as' will become a reserved keyword in

[web2py] Re: web2py Application Development Cookbook

2011-12-05 Thread Massimo Di Pierro
They told me another 3 months. We are doing writing but they do not use any markup language. Packt does all the editing and processing using MS word so it takes time. massimo On Dec 5, 9:16 am, António Ramos ramstei...@gmail.com wrote: Hello, when will this book be available in PacktPub? I

[web2py] Re: Do you compile app ?

2011-12-05 Thread Omi Chiba
Thank you all for the ideas and I just submitted the ticket (Issue# 556) for Plumo. I'm still not sure if it's a best practice to compile the app even if you don't see any performance issue, but that would be great if it's done automatically. On Dec 2, 10:41 pm, Massimo Di Pierro

[web2py] Re: running from trunk fails

2011-12-05 Thread Massimo Di Pierro
It is a bug. Fixed now. On Dec 5, 11:06 am, Jim Steil j...@qlf.com wrote: Anyone else having trouble with web2py trunk this morning? A fresh install gets me a ticket and trying to view the ticket results in another ticket. Also get a warning in the console:

Re: [web2py] Re: running from trunk fails

2011-12-05 Thread Jim Steil
That fixed it. Thanks Massimo. -Jim On 12/5/2011 11:26 AM, Massimo Di Pierro wrote: It is a bug. Fixed now. On Dec 5, 11:06 am, Jim Steilj...@qlf.com wrote: Anyone else having trouble with web2py trunk this morning? A fresh install gets me a ticket and trying to view the ticket

[web2py] Re: web2py for dummies

2011-12-05 Thread Cliff
mikech, Have you looked here: http://web2py.com/examples/default/examples On Dec 5, 12:33 am, mikech mp.ch...@gmail.com wrote: I've been thinking along these same lines.  I would like to see a workbook to go along with the web2py book in which the concepts in the book are illustrated in a

Re: [web2py] Re: SSL Error

2011-12-05 Thread António Ramos
Please a tip i created my certificates reading a tutorial for openssl and apache. What is the best way to create certificates for web2py? a simple tutorial? Thank you Em 2 de novembro de 2011 11:02, António Ramos ramstei...@gmail.comescreveu: Context: Windows Did not tried yet using the

Re: [web2py] Is this a in custom imports?

2011-12-05 Thread Martín Mulone
Interesting I have this working without passing the self parameter, anyways this is an old code I update this code a lot. And yes is not need to use a defined auth you can remove it. 2011/12/5 Anthony abasta...@gmail.com Why do you do: self.auth_def = lambda: self.define_auth Anyway, that

Re: [web2py] Is this a in custom imports?

2011-12-05 Thread Anthony
Yeah, I wasn't sure about the need for 'self' -- I guess Python doesn't see it as a method. But is it supposed to call define_auth() rather than simply return it? What is the purpose of that code? Anthony On Monday, December 5, 2011 12:47:09 PM UTC-5, Martin.Mulone wrote: Interesting I have

[web2py] Re: Is it possible to intercept the flash message and parse it before appearing to the view?

2011-12-05 Thread Constantine Vasil
OK but I want to intercept it before actual flash is done, I want to format my flash code on the layout.html before flash to appear.

[web2py] Re: Is it possible to intercept the flash message and parse it before appearing to the view?

2011-12-05 Thread Massimo Di Pierro
In your action before return you can access it in response.flash If your action before redirect you can access it in session.flash You have to do both. Alternatively, you can access response.flash in the view, before {{extend...}} On Dec 5, 11:56 am, Constantine Vasil

[web2py] Re: Is it possible to intercept the flash message and parse it before appearing to the view?

2011-12-05 Thread Anthony
The default layout.html includes: div class=flash{{=response.flash or ''}}/div and there is some CSS that controls how it looks, and some code in web2py_ajax.js controlling its display. You could add some code there, or in the controller that generates the response.flash. Anthony On Monday,

[web2py] Re: Is it possible to intercept the flash message and parse it before appearing to the view?

2011-12-05 Thread Constantine Vasil
thanks to you both!

Re: [web2py] Is this a in custom imports?

2011-12-05 Thread Constantine Vasil
I was following the code here: Optimize your web2py app using the new import method http://martin.tecnodoc.com.ar/default/tag?name=import If there is a bug in this code how you would do that correctly?

Re: [web2py] Is this a in custom imports?

2011-12-05 Thread Anthony
Forget the self.auth_def = lambda... -- just call self.define_auth() directly. Does that work? On Monday, December 5, 2011 1:21:31 PM UTC-5, Constantine Vasil wrote: I was following the code here: Optimize your web2py app using the new import method

[web2py] Bug : exec_environment vs. Auth

2011-12-05 Thread Mirek Zvolský
1.99.2, WinXP Model works fine from browser and from integrated shell. But there is problem from exec_environment, when model contains Auth: os.chdir(r'c:\python27\Lib\site-packages\web2py') from gluon.shell import exec_environment cas = exec_environment('applications/cas/models/db.py')

Re: [web2py] Bug : exec_environment vs. Auth

2011-12-05 Thread Bruno Rocha
I think this is not a bug. Auth needs 'request' to build some paths and also will need it to do other things. The fact is that Auth was designed to run in a server-client environment, where server will always have a request object. if you need to run in exec_environment or in shell mode you will

Re: [web2py] Bug : exec_environment vs. Auth

2011-12-05 Thread Bruno Rocha
I mean, Class based logic in modules. -- Bruno Rocha [http://rochacbruno.com.br]

[web2py] Re: web2py for dummies

2011-12-05 Thread mikech
Thanks Cliff, I will take a look. I Mike

[web2py] Setting up eclipse for web2py development

2011-12-05 Thread chandrakant kumar
I am trying to setup eclipse for web2py development. I tried using (if 0: import things) trick, then i get lot of warning about unused functions. Is there any neater way of doing this.

[web2py] Re: web2py for dummies

2011-12-05 Thread ma...@rockiger.com
Hi Andrea, I am working on a book about learning web development with web2py. The conzept is a mixture of railsturial.org and Headfirst Html. I will post the first 3 chapters before christmas. Marco

Re: [web2py] Is this a in custom imports?

2011-12-05 Thread Constantine Vasil
I will try and tell you soon. Thanks. I am learning web2py three weeks already and think now I understand it how it works. The web2py community help is great!

[web2py] Re: web2py Application Development Cookbook

2011-12-05 Thread Constantine Vasil
Currently I am reading a draft book in Safari Books Online for which I paid for in advance. I get emails when an update is ready, I click on the link http://my.safaribooksonline.com/mydownloads, login to my account, download an encoded pdf of the book and read it in draft. When the book is

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Constantine Vasil
I got response form jQuery Mobile developers and the answer is: The redirect issue isn't solvable until XmlHttpRequest2 see's better support and a redirect callback is added upstream in jQuery Core. If you are doing redirects on submission turning off ajax is really your only option. Now -

[web2py] Re: Splitting controllers?

2011-12-05 Thread Ryan DowlingSoka
Yes it was! Thanks. The site is largely remaining the same, just with improvements and cleaner code, it was mostly developed over 4 weeks last year so shortcuts are numerous and terrifying. One of the main problems I'm having with splitting the code is the utility functions needing access to auth

[web2py] Re: Splitting controllers?

2011-12-05 Thread Anthony
On Monday, December 5, 2011 4:34:16 PM UTC-5, Ryan DowlingSoka wrote: So to clarify, is there something fundamentally wrong with having utility (non-view) functions defined in a controller? I don't think there's anything fundamentally wrong with that, if it works for you.

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Anthony
Maybe instead of a regular redirect, send back a regular 200 response with the Ajax request, and add a special response header with the redirect URL (e.g., response.headers['client_redirect'] = URL('other_function')). On the client side, have some JS code that runs upon successful Ajax

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Constantine Vasil
Do you think this simple solution will work? http://www.adequatelygood.com/2010/7/Saner-HTML5-History-Management

[web2py] Configuring web2py with nginx - domain error (gaierror: [Errno -2] Name or service not known)

2011-12-05 Thread Chris
I'm using web2py with nginx, and I've experienced the following error on redeploying my app: socket.gethostbynamesocket.gethostbyname(http_host) File /var/ web2py/cow/gluon/main.py, line 396, in wsgibase socket.gethostbyname(http_host)] gaierror: [Errno -2] Name or service not

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Anthony
Don't know -- give it a try. On Monday, December 5, 2011 5:48:01 PM UTC-5, Constantine Vasil wrote: Do you think this simple solution will work? http://www.adequatelygood.com/2010/7/Saner-HTML5-History-Management

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Constantine Vasil
Your approach is better. On the client side, have some JS code that runs upon successful Ajax completion and looks for that header. How you would do that?

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Constantine Vasil
By the way I discovered jsbin - an easy way to publish html code, then got the source from browser bar just before it is rendered: http://jsbin.com/ojamak/4/edit here is where I hit submit: input data-ajax=false data-theme=e type=submit value=Sign Up / and I see: input name=_next type=hidden

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Anthony
You could use the jQuery ajaxSuccess event handler (http://api.jquery.com/ajaxSuccess/), and in the ajaxSuccess event handler, check for the special header via xhr.getResponseHeader('name-of-header'). From there, you'll have to figure out what to do, based on how jQuery Mobile works (I'm not

[web2py] loading db in module - AttributeError: 'thread._local' object has no attribute 'db'

2011-12-05 Thread Francisco Costa
Hi, in models/db.py I have: from gluon.globals import current current.db = db In modules/example.py I have: from gluon.globals import * db = current.db but I get this error: AttributeError: 'thread._local' object has no attribute 'db' if I print current.db I get the output but why can't I

[web2py] Re: loading db in module - AttributeError: 'thread._local' object has no attribute 'db'

2011-12-05 Thread Anthony
Read the callout box at the end of this section: http://web2py.com/book/default/chapter/04#Accessing-the-API-from-Python-modules. You're not supposed to assign items from 'current' to global variables within the module, which are defined only once when the module is first imported. Anthony

[web2py] Re: loading db in module - AttributeError: 'thread._local' object has no attribute 'db'

2011-12-05 Thread Francisco Costa
thanks Anthony, but how can I have access to db in modules then? On Dec 6, 1:14 am, Anthony abasta...@gmail.com wrote: Read the callout box at the end of this section:http://web2py.com/book/default/chapter/04#Accessing-the-API-from-Pyth You're not supposed to assign items from 'current' to

Re: [web2py] Re: loading db in module - AttributeError: 'thread._local' object has no attribute 'db'

2011-12-05 Thread Bruno Rocha
you cant assign db to current. you need to pass db to you class __init__ http://zerp.ly/rochacbruno Em 05/12/2011 23:21, Francisco Costa m...@franciscocosta.com escreveu: thanks Anthony, but how can I have access to db in modules then? On Dec 6, 1:14 am, Anthony abasta...@gmail.com wrote:

[web2py] bug in SQLFORM?, cls not defined

2011-12-05 Thread Carlos
Hi, I believe there's a bug in SQLFORM, where cls is not defined. line # 842 @ __init__ line # 1097 @ accepts UploadWidget should be used instead?. Thanks, Carlos

Re: [web2py] Is this a in custom imports?

2011-12-05 Thread Constantine Vasil
removed labda, now it is: def __init__(self): pass Now I see self.define_auth() executed in init_auth, but got this error at this line: label=T('Username')), NameError: global name 'T' is not defined

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Constantine Vasil
Thank you, Anthony, will check it.

[web2py] Re: Setting up eclipse for web2py development

2011-12-05 Thread Massimo Di Pierro
are you doing: if 0: from gluon import * or are you doing something else? On Dec 5, 2:40 pm, chandrakant kumar k.03chan...@gmail.com wrote: I am trying to setup eclipse for web2py development. I tried using (if 0: import things) trick, then i get lot of warning about unused functions. Is

[web2py] Re: web2py for dummies

2011-12-05 Thread Massimo Di Pierro
Look forward to this. On Dec 5, 3:12 pm, ma...@rockiger.com rocki...@googlemail.com wrote: Hi Andrea, I am working on a book about learning web development with web2py. The conzept is a mixture of railsturial.org and Headfirst Html. I will post the first 3 chapters before christmas. Marco

[web2py] Re: bug in SQLFORM?, cls not defined

2011-12-05 Thread Massimo Di Pierro
right. thanks! On Dec 5, 7:32 pm, Carlos carlosgali...@gmail.com wrote: Hi, I believe there's a bug in SQLFORM, where cls is not defined.    line # 842 @ __init__    line # 1097 @ accepts UploadWidget should be used instead?. Thanks,    Carlos

[web2py] Numbers only field

2011-12-05 Thread Saurabh S
Hi i have used custom form in my application example: tr td {{=form.custom.label.mobile}}:/td td{{=form.custom.widget.mobile}}/td td{{=form.custom.label.email}}:/td td{{=form.custom.widget.email}}/td /tr I need a javascript/jqeury function to

[web2py] Add Appending Fields to a Form with Ajax

2011-12-05 Thread Aaron Levin
Hi, I'm really enjoying the simplicity of Web2py. However, for the life of me, I cannot figure out a way to accomplish this without re-writing FORM/SQLFORM. So, I know I'm not understanding something :) I'm writing a small app to make lists. Each list has many items. I'd like a user to be able

[web2py] Re: Splitting controllers?

2011-12-05 Thread Ryan DowlingSoka
Alright I have another question. I'm bashing my head against the wall- I've started by defining those earlier utility functions I talked about in a model- and want to be able to access it in layout.html - possible? On Dec 5, 5:31 pm, Anthony abasta...@gmail.com wrote: On Monday, December 5, 2011

[web2py] Re: Setting up eclipse for web2py development

2011-12-05 Thread Vineet
@chandrakant kumar, https://groups.google.com/group/web2py/browse_thread/thread/b6c0cf5d61d0c565/a40a34c4f91661bb?lnk=gstq=eclipse# In that thread, see the post by Miguel Lopes -- 4th from the bottom. HTH. --- Vineet On Dec 6, 6:53 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: are

[web2py] Re: Chunked downloads and corrupt files with Internet Explorer 8 (IE8)

2011-12-05 Thread David Tse
I'm experiencing this problem as well, and signs on my side are also pointing to Rocket. Although my case is a little different because I'm not currently experiencing this problem with web2py, but I'm using Rocket by itself to serve a light-weight service using a smaller micro-framework.

[web2py] Re: Numbers only field

2011-12-05 Thread Massimo Di Pierro
scriptjQuery('#tablename_fieldname').keyup(function() {this.value=this.value.replace(/[^ 0-9]/g,'');});/script On Dec 5, 9:46 pm, Saurabh S ggtestlo...@gmail.com wrote: Hi i have used custom form in my application example:  tr             td {{=form.custom.label.mobile}}:/td            

Re: [web2py] Is this a in custom imports?

2011-12-05 Thread Anthony
Try label = current.T('Username'). On Monday, December 5, 2011 8:48:58 PM UTC-5, Constantine Vasil wrote: removed labda, now it is: def __init__(self): pass Now I see self.define_auth() executed in init_auth, but got this error at this line:

[web2py] csv export compressed

2011-12-05 Thread Nbush
I would like to make a controller function that does csv export compressed . How can this be done in web2py?

[web2py] Re: Splitting controllers?

2011-12-05 Thread Anthony
On Monday, December 5, 2011 11:01:54 PM UTC-5, Ryan DowlingSoka wrote: Alright I have another question. I'm bashing my head against the wall- I've started by defining those earlier utility functions I talked about in a model- and want to be able to access it in layout.html - possible? Yes,

[web2py] Re: Splitting controllers?

2011-12-05 Thread Ryan DowlingSoka
Thanks! Turns out the reason I thought that wasn't working, was because I'm an idiot- and was uploading the wrong file, as in the one I wasn't updating... Again thanks. On Dec 5, 11:25 pm, Anthony abasta...@gmail.com wrote: On Monday, December 5, 2011 11:01:54 PM UTC-5, Ryan DowlingSoka wrote:

[web2py] Inline image generation with matplotlib

2011-12-05 Thread Pumplerod
Is there a way, or example, I could be pointed to which demonstrates using mathplotlib to plot upon request without writing the image file to disk? I'm able to create my plot and save it to the static/images directory which then I can load within my view, however I would like to be able to

[web2py] Re: Inline image generation with matplotlib

2011-12-05 Thread Massimo Di Pierro
def myimage(): import cSringIO fig=Figure() ... canvas=FigureCanvas(fig) stream=cStringIO.StringIO() canvas.print_png(stream) return stream.getvalue() then use {{=IMG(_src=URL('myimage'))}} to include it. On Dec 5, 10:32 pm, Pumplerod toddshifflett.acco...@gmail.com

[web2py] Re: Numbers only field

2011-12-05 Thread Saurabh S
Thanks Massimo :) On Dec 6, 9:18 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: scriptjQuery('#tablename_fieldname').keyup(function() {this.value=this.value.replace(/[^ 0-9]/g,'');});/script On Dec 5, 9:46 pm, Saurabh S ggtestlo...@gmail.com wrote: Hi i have used custom form

[web2py] Re: Inline image generation with matplotlib

2011-12-05 Thread Pumplerod
Ahh. Thank you. It was the inclusion part I couldn't grasp. On Dec 5, 8:47 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: def myimage():     import cSringIO     fig=Figure()     ...     canvas=FigureCanvas(fig)     stream=cStringIO.StringIO()     canvas.print_png(stream)    

[web2py] Re: date and sum

2011-12-05 Thread Rick
Perhaps I should explain my problem once again. I'd like to summarize the values for each day in the record list. With other words, so that this: record.thedate[0] = 2011-12-01 record.value[0] = 10 record.thedate[1] = 2011-12-01 record.value[1] = 20 record.thedate[3] = 2011-12-02

[web2py] Re: date and sum

2011-12-05 Thread Anthony
That's what Massimo's code does. You'll just have to add the auth.user_id and session.adate filters to the query (i.e., in the parentheses before the .select). Anthony On Dec 6, 1:05 am, Rick sababa.sab...@gmail.com wrote: Perhaps I should explain my problem once again. I'd like to summarize