[web2py] deployment

2012-02-17 Thread shartha
Please forgive me if this question is naïve. This is my first try to instal web2py on a Linux host that supports wsgi. My best bet was to do the same as: http://web2py.pythonanywhere.com/welcome/default/index But when I run the echo command, I got an error that the /var/www/ wsgi.py

[web2py] Re: turnoff the default datepicker

2012-02-17 Thread Niphlod
it's embedded through web2py_ajax.js, or web2py.js, depending on the version

[web2py] Re: jQuery UI multiselect

2012-02-17 Thread Annet
Hi Alan, Thanks for your replies. They pointed me in the right direction to solve the multiselect problem. I am left with one small problem. The form that contains the multiselect also contains an autocomplete function: def index(): form=SQLFORM.factory(

Re: [web2py] Re: turnoff the default datepicker

2012-02-17 Thread Martin Weissenboeck
I am using 1.99.4 web2py_ajax.js is the answer. I have deleted two lines and now everything works as expected. Thank you! Maybe there should be a more simple way to use AnyTime with own parameters. 2012/2/17 Niphlod niph...@gmail.com it's embedded through web2py_ajax.js, or web2py.js,

[web2py] Re: jQuery UI multiselect

2012-02-17 Thread Alan Etkin
If the controller function is expecting a form field value, it should be retrieved with request.vars.name, where name is the field name in the form. You can also retrieve the form fields values with form.vars.name after .process() (if the form passes validation) or .accepts() Anyway, I don't know

[web2py] Re: Forms not working with web2py in Chrome

2012-02-17 Thread Sameh Khalil
I'm running from the source version 1.99.4 from my own python 2.7 installation, Model Code db = DAL(sqlite://storage.sqlite) db.define_table('image', Field('title', unique=True), Field('file', 'upload'), format = '$(title)s') db.define_table('comment', Field('image_id', db.image),

[web2py] Re: Forms not working with web2py in Chrome

2012-02-17 Thread Ross Peoples
I don't know if it helps, but I spotted a typo: Replace the dollar sign in: 'image, format = '$(title)s' with format ='%(title)s'

Re: [web2py] Re: How to Generate the effective report by using web2py

2012-02-17 Thread Ross Peoples
Sanjeet. I sent some code to Mariano last night. So we will have to wait and see if it works for him.

[web2py] Re: Why admin|examples|welcome in hgignore?

2012-02-17 Thread Ross Peoples
I'm not great with regular expressions, but I think it's saying ignore everything in the applications folder EXCEPT admin, examples, welcome, and __init__. I think that's what the '?!' means.

Re: [web2py] Re: How to Generate the effective report by using web2py

2012-02-17 Thread Sanjeet Kumar
Thanks Ross On Fri, Feb 17, 2012 at 6:23 PM, Ross Peoples ross.peop...@gmail.comwrote: Sanjeet. I sent some code to Mariano last night. So we will have to wait and see if it works for him.

Re: [web2py] Re: Why admin|examples|welcome in hgignore?

2012-02-17 Thread Bruce Wade
startswith ^ applications/(is like?!(admin or examples or welcome or __init__)). endswith anything after the . On Fri, Feb 17, 2012 at 4:56 AM, Ross Peoples ross.peop...@gmail.comwrote: I'm not great with regular expressions, but I think it's saying ignore everything in the applications folder

[web2py] Re: rendering a view

2012-02-17 Thread Wikus van de Merwe
If all what you want to do is to link to individual items from the main page, you don't need to use redirect at all. Simply add HTML code to your view that would link to /arcticles/show/[id] or /bussiness/show/[id] as needed. ul {{ for article in articles: }} {{=LI(A(article.title,

[web2py] Re: validators.py error in

2012-02-17 Thread Alan Etkin
I've updated from hg repository to this version: Version 1.99.4 (2012-02-14 08:44:22) stable The mentioned error doesn't reproduce now. Thank you On 12 feb, 21:52, Alan Etkin spame...@gmail.com wrote: Thank you Bruce. It is possible to do hg log, it shows the complete commit list until the

Re: [web2py] Re: turnoff the default datepicker

2012-02-17 Thread Anthony
On Friday, February 17, 2012 6:23:48 AM UTC-5, mweissen wrote: I am using 1.99.4 web2py_ajax.js is the answer. I have deleted two lines and now everything works as expected. This must be an older version of web2py_ajax.js, as the name of the file was changed to web2py.js a while back.

[web2py] Re: deployment

2012-02-17 Thread Wikus van de Merwe
The directory does not exist. Run mkdir /var/www first.

[web2py] Re: adding extra form elements in a

2012-02-17 Thread Anthony
chapter 7.2.8 of the books tells how to add extra form elements to SQLFORM. My question: I want to use a SQLFORM.smartgrid. On adding a new record a SQLFORM appears. It is possible to add an extra form element to this form? Concrete: I want to add a button to activate a datepicker in the

[web2py] Re: Why admin|examples|welcome in hgignore?

2012-02-17 Thread Wikus van de Merwe
The intention is not to track changes in user made applications (different than the default ones). ?! is the negative lookahead operator, so the first part of the expression will match applications/ only if it is not followed with any of the strings in the brackets. The the second part (.*)

[web2py] jqGrid to SmartGrid - Who's made the switch?

2012-02-17 Thread Willoughby
Hello All, I've inherited a site running on v1.61.1 and we're looking at updating/upgrading things. Grids are an integral part of the site and was built extensively with jgGrid including a search plugin, etc. SmartGrid seems to be near the point we need it to be to switch things over

Re: [web2py] jqGrid to SmartGrid - Who's made the switch?

2012-02-17 Thread Jim Steil
I've made the switch, but I was new to web2py and jqgrid when .smartgrid came out so it wasn't that tough for me. Happily, the result was that my boilerplate code is now about 10x less than it was with jqgrid. .smartgrid isn't perfect, but it works well and was easy to implement. And, I'm

[web2py] what are these css classes?: w2p_fl w2p_fw w2p_fc

2012-02-17 Thread Yarin
Can someone explain what the following css classes are all about: w2p_fl w2p_fw w2p_fc I see them in the user form and elsewhere, but there's no documentation or explanation as to why they are applied.

[web2py] Re: what are these css classes?: w2p_fl w2p_fw w2p_fc

2012-02-17 Thread Anthony
w2p_fl: web2py field label w2p_fw: web2py field widget w2p_fc: web2py field comment Each input field in a web2py SQLFORM gets a label, widget, and (optional) comment. Those classes are added to the appropriate TD, DIV, or LI elements (depending on the formstyle) to make it easy to apply

[web2py] Re: rendering a view

2012-02-17 Thread Praveen Bhat
Hello, Now I am getting the following error: type 'exceptions.SyntaxError' when calling URL, function or function name required regards, Praveen

[web2py] Re: rendering a view

2012-02-17 Thread Niphlod
I recommend fondly that you read http://web2py.com/books/default/chapter/29/4#URL. URL() function is very important for anyone starting using web2py... In your case you have to add article.id as the only arg.

[web2py] Re: rendering a view

2012-02-17 Thread Anthony
On Friday, February 17, 2012 11:43:04 AM UTC-5, Praveen Bhat wrote: Hello, Now I am getting the following error: type 'exceptions.SyntaxError' when calling URL, function or function name required See my answer here: http://stackoverflow.com/a/9330047/440323 If you get a syntax error,

[web2py] delete_next= and SQLFORM

2012-02-17 Thread Richard
Hello, When user submit, I redirect him on a read form, but I get in trouble when for example user has delete a record with update form. I solve it like this when use SQLFORM() : if form.accepts(request.vars, session): session.flash = T('form accepted') if

Re: [web2py] delete_next= and SQLFORM

2012-02-17 Thread Richard Vézina
Also, I don't like the solution I come with since I have to make db request... Richard On Fri, Feb 17, 2012 at 12:43 PM, Richard ml.richard.vez...@gmail.comwrote: Hello, When user submit, I redirect him on a read form, but I get in trouble when for example user has delete a record with

[web2py] Re: deployment

2012-02-17 Thread shartha
I am not authorized to make such directory on my server. In my server, my files should go into the public_html folder that resides inside my /home/domainName/public_html. Give that, should I still make a /var/www folder? What is the purpose for the /var/www on pythonanywhere? On Feb 17, 7:49 am,

[web2py] Re: rendering a view

2012-02-17 Thread Wikus van de Merwe
Right, my bad, I missed the args keyword in the URL call. It should be: URL(articles, show, args=article.id). For more details see the examples given by Anthony.

Re: [web2py] delete_next= and SQLFORM

2012-02-17 Thread Anthony
You can test if the record was deleted by checking for the delete_this_record variable: if form.vars.delete_this_record: Also, instead of handling the logic after form.accepts(), you could use form.process(..., onsuccess=some_function) and have the some_function() callback check for the

Re: [web2py] delete_next= and SQLFORM

2012-02-17 Thread Richard Vézina
Thanks Anthony! The book is mute about that... Richard On Fri, Feb 17, 2012 at 1:27 PM, Anthony abasta...@gmail.com wrote: You can test if the record was deleted by checking for the delete_this_record variable: if form.vars.delete_this_record: Also, instead of handling the logic after

Re: [web2py] delete_next= and SQLFORM

2012-02-17 Thread Richard Vézina
How to manage session.flash=... with form.process()? Richard On Fri, Feb 17, 2012 at 1:31 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Thanks Anthony! The book is mute about that... Richard On Fri, Feb 17, 2012 at 1:27 PM, Anthony abasta...@gmail.com wrote: You can test if

Re: [web2py] delete_next= and SQLFORM

2012-02-17 Thread Richard Vézina
Ok, just put it the onssess=func Richard On Fri, Feb 17, 2012 at 2:05 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: How to manage session.flash=... with form.process()? Richard On Fri, Feb 17, 2012 at 1:31 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Thanks Anthony!

[web2py] web2py + GAE memory usage

2012-02-17 Thread howesc
Hi all, I see this in mt GAE logs from time to time: 1. 2012-02-17 11:35:59.737 Exceeded soft private memory limit with 129.473 MB after servicing 107 requests total 2. W2012-02-17 11:35:59.737 After handling this request, the process that handled this request was found

Re: [web2py] jqGrid to SmartGrid - Who's made the switch?

2012-02-17 Thread Willoughby
Thanks Jim - easier upgrades and lower overhead is definitely an attraction! I guess my next step is to do some quick prototypes and see. Thanks for sharing your experience...

[web2py] Re: web2py + GAE memory usage

2012-02-17 Thread Massimo Di Pierro
Can you reproduce this with the welcome app? On Feb 17, 2:09 pm, howesc how...@umich.edu wrote: Hi all, I see this in mt GAE logs from time to time:    1. 2012-02-17 11:35:59.737    Exceeded soft private memory limit with 129.473 MB after servicing 107 requests total    2. W2012-02-17

[web2py] Need help understanding a line of code

2012-02-17 Thread davidkw
Hi, I'm going through the web2py tutorial and I don't understand part of this line: db.comment.image_id.requires = IS_IN_DB(db, db.image.id, '%(title)s') I understand that this requires that the image ID of the image the comment is under should be in the database. However, I don't understand

Re: [web2py] Need help understanding a line of code

2012-02-17 Thread Bruce Wade
title is a field in the image table, when displayed in the form it will show the title instead of the id in the combo-box On Fri, Feb 17, 2012 at 4:02 PM, davidkw trixiesr4k...@hotmail.com wrote: Hi, I'm going through the web2py tutorial and I don't understand part of this line:

[web2py] Re: Need help understanding a line of code

2012-02-17 Thread Anthony
Hi, I'm going through the web2py tutorial and I don't understand part of this line: db.comment.image_id.requires = IS_IN_DB(db, db.image.id, '%(title)s') I understand that this requires that the image ID of the image the comment is under should be in the database. However, I don't

[web2py] Question about web2py syntax

2012-02-17 Thread davidkw
For the line: db().select(db.image.ALL, orderby=db.image.title) Why is there a () after the db and before the select? Is db() a method call of some kind? Thanks for any clarification.

[web2py] Re: Need help understanding a line of code

2012-02-17 Thread davidkw
Thank you! On Feb 17, 8:08 pm, Anthony abasta...@gmail.com wrote: Hi, I'm going through the web2py tutorial and I don't understand part of this line: db.comment.image_id.requires = IS_IN_DB(db, db.image.id, '%(title)s') I understand that this requires that the image ID of the image the

[web2py] Re: Question about web2py syntax

2012-02-17 Thread Anthony
db is a DAL object, which is callable. Its __call__ method takes a query and returns a Set object, which has a select() method for pulling records from the database. So, typically, you would do: db(query).select(...) However, you can call db without any query (it defaults to None), in which