[web2py] jstree, controller call

2012-04-15 Thread Simon Ashley
Having difficulties coming up with an appropriate call back from a jstree triggered from a .bind event. Javascript/ JQuery/ jsTree code is as follows: ).bind(select_node.jstree, function (event, data) { xxx } what we're trying to do is to make the call back (xxx) to the controller to

Re: [web2py] shared host deployment of my web2py site

2012-04-15 Thread Chibuzo Ottih
So you mean I should just click the 'configure' file? And how do I add the parameters, are u saying I need to edit the file or once u click to run it, everything is going to go as expected. Another thing is this, I don't see anyway to run files in my Home directory. There are other options to a

Re: [web2py] CMS/blog app suitable for web2py beginners

2012-04-15 Thread Chibuzo Ottih
InstantPress is a more suitable CMS for blogs. That's its main aim. Movuca is a general CMS but more focused on social sites. I've used instantpress and its much fun. Its very easy to customize and has so many features you may want to add to your blog(e.g disquss) On Saturday, April 14, 2012,

[web2py] Re: CMS/blog app suitable for web2py beginners

2012-04-15 Thread Gour
On Sun, 15 Apr 2012 07:39:58 +0100 Chibuzo Ottih doncoleon...@gmail.com wrote: InstantPress is a more suitable CMS for blogs. Thank you. That's its main aim. But it ca nbe use as CMS as well, right? Movuca is a general CMS but more focused on social sites. Yeah, we're not interested for

[web2py] Re: priority of web2py CMS

2012-04-15 Thread Gour
On Mon, 16 Jan 2012 12:41:32 -0800 (PST) Ross Peoples ross.peop...@gmail.com wrote: Hello Ross, The good news is I've already figured out how to do it, I just have to put the work in. Have you done some work on your web2py-powered-CMS-ala-C5? Sincerely, Gour -- But those who, out of envy,

[web2py] vCard and vEvent

2012-04-15 Thread Annet
In a web2py application I generate .vcf and .ics files using web2py's templating features. The problem is that all the code in {{}} results in empty lines, which is no problem on my Mac, but Google doesn't allow empty lines. For example, this: {{response.headers['Content-Disposition'] =

Re: [web2py] CMS/blog app suitable for web2py beginners

2012-04-15 Thread Chibuzo Ottih
Yeah, with instantpress, you can manage users, create tags and categories, publish articles in few seconds and more. It also has the ability to manage comments. To see more, I think you should download it and add it as an application to your web2py framework to see how it works. Most of your

Re: [web2py] Overlapping periods

2012-04-15 Thread Rick
Thanks for the replies. Pbreit, you pointed the real issue -- what should I call the arguments (addperiodform.vars.id), that are passed from the goal function to the addingperiod function? from the controller file: def goal(): ...some code... addperiodform = SQLFORM(db.period,

[web2py] smartgrid crashes when submitting a duplicate field value

2012-04-15 Thread weheh
If smartgrid is used to edit the values of fields in auth_user that are designated unique=True, smartgrid will crash when a duplicate value is entered. Here's a ticket trace. SQLite is the underlying db. Incidentally, this is my first go at grid and smartgrid and I'm very impressed. Kudos.

Re: [web2py] Re: Multiselect form and many-to-many relationship

2012-04-15 Thread Chris Rowson
Heh, no worries. :-) I wonder, just out of interest, is there any great performance difference between searching for records containing region.id 'x' (as below) rather than returning all rows with region.id 'x' from a junction table? Chris On Sat, Apr 14, 2012 at 11:34 PM, villas

[web2py] Re: Vertical lines around database string values

2012-04-15 Thread Yarin
This went away, don't know why or how.. On Saturday, April 14, 2012 11:17:51 AM UTC-4, Yarin wrote: When inserting records with web2py's db class, my string values have vertical bars surrounding them. I don't remember seeing this behavior before. What's more, if i insert records through

[web2py] Re: vCard and vEvent

2012-04-15 Thread Anthony
In a web2py application I generate .vcf and .ics files using web2py's templating features. The problem is that all the code in {{}} results in empty lines, which is no problem on my Mac, but Google doesn't allow empty lines. For example, this: {{response.headers['Content-Disposition']

[web2py] Re: How to create a form from db.mytable, add checkboxes to each row and use form.custom.begin?

2012-04-15 Thread DenesL
Only SQLFORM has a custom attribute. You are using FORM.

[web2py] Re: how to access google spreadsheets using Oauth2 in web2py

2012-04-15 Thread Massimo Di Pierro
Look into gluon/contrib/login_methods/oauth2_auth.py there is sample code in there. On Saturday, 14 April 2012 09:33:51 UTC-5, SB wrote: how to access google spreadsheets using Oauth2 in web2py. Need help.

[web2py] Re: Design of a minimal chat-like application in Web2py

2012-04-15 Thread Massimo Di Pierro
there is a chat in KPAX (in its own controller). Not very efficient because does not uses websockets but works. You may want to look also into gluon/contrib/comet_messaging.py On Friday, 13 April 2012 17:30:19 UTC-5, cyan wrote: Hi group, I am trying to make a minimal multiuser chat-like

[web2py] Re: new feature in trunk: full auditing

2012-04-15 Thread Massimo Di Pierro
Fixed in trunk. On Saturday, 14 April 2012 23:10:18 UTC-5, tomt wrote: I discovered why the archive table wasn't being created, there is a typo in gluon/tools.py at line 1293: for table in tables: if 'modifed_on' in table.fields(): should be for table in

[web2py] Re: smartgrid crashes when submitting a duplicate field value

2012-04-15 Thread Massimo Di Pierro
Please submit a google code ticket. On Sunday, 15 April 2012 06:09:19 UTC-5, weheh wrote: If smartgrid is used to edit the values of fields in auth_user that are designated unique=True, smartgrid will crash when a duplicate value is entered. Here's a ticket trace. SQLite is the underlying

[web2py] Re: How to create a form from db.mytable, add checkboxes to each row and use form.custom.begin?

2012-04-15 Thread web2py_Superfan
Thanks a bunch DenesL, Do you know how I could use SQLFORM and have the checkboxes added to each row in the form? I couldn't figure that out. On Sunday, April 15, 2012 7:12:13 AM UTC-7, DenesL wrote: Only SQLFORM has a custom attribute. You are using FORM.

[web2py] Re: How to create a form from db.mytable, add checkboxes to each row and use form.custom.begin?

2012-04-15 Thread web2py_Superfan
when I change FORM to SQLFORM i get error 'THEAD' object has no attribute 'writable' On Sunday, April 15, 2012 7:58:37 AM UTC-7, web2py_Superfan wrote: Thanks a bunch DenesL, Do you know how I could use SQLFORM and have the checkboxes added to each row in the form? I couldn't figure that

Re: [web2py] Re: Multiselect form and many-to-many relationship

2012-04-15 Thread villas
Depends, but I think there would always be a difference in favour of normalized data because the data access is fully indexed. However, this difference may be almost negligible if your main table is less than say 10K records and your queries are simple. In my experience, where

[web2py] Re: How to create a form from db.mytable, add checkboxes to each row and use form.custom.begin?

2012-04-15 Thread DenesL
You can not just substitute FORM with SQLFORM. In your case it is better to stick with FORM and use element to access and modify the table inside the form. tbod=form.element('table tbody') # the body of the SQLTABLE tbod is a list of the table rows, so tbod[0] is the first TR and each TR is a

[web2py] Re: How to create a form from db.mytable, add checkboxes to each row and use form.custom.begin?

2012-04-15 Thread web2py_Superfan
Thanks again, will give it a shot On Sunday, April 15, 2012 9:39:32 AM UTC-7, DenesL wrote: You can not just substitute FORM with SQLFORM. In your case it is better to stick with FORM and use element to access and modify the table inside the form. tbod=form.element('table tbody') # the

Re: [web2py] CPU 210%

2012-04-15 Thread Bruce Wade
I think it was the server. I rebuilt/installed from scratch OS etc.. the server last night and now it seems to be running without problems. I am slowing increasing the load to see how well it handles before moving it to the new site again. On Sat, Apr 14, 2012 at 8:13 PM, Bruno Rocha

[web2py] Anyone use Jmeter for load testing web2py before?

2012-04-15 Thread Bruce Wade
Hi, I want to load test my server to see how much it can handle while running my web2py app. I came across Jmeter has any used this or have a better suggestion? http://jmeter.apache.org/ -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com

Re: [web2py] shared host deployment of my web2py site

2012-04-15 Thread Keith Edmunds
On Sun, 15 Apr 2012 07:36:19 +0100, doncoleon...@gmail.com said: So you mean I should just click the 'configure' file? You need to do this from the command line. And how do I add the parameters, are u saying It's you, not u. You need a open a terminal window and type in the commands you

Re: [web2py] Eclipse and autocomplete

2012-04-15 Thread cyan
I've just tried it out. Unzip the latest stable source code of web2py to a folder, say, web2py_src. Go to Eclipse - Preferences - PyDev - 'Interpreter - Python' In the 'System PYTHONPATH' window, add 'web2py_src' to the path. So far, it seems autocomplete is working without doing all the

[web2py] routes.py

2012-04-15 Thread namfonos
got a problem with my routes routes_in = ( ('/asdf', '/aggat/default/rules'), ) routes_out = ( ('/aggat/default/rules', '/asdf'), ) isn't working, but i followed the same format on the web2py tutorial defining the base router works when i have that defined alone

[web2py] Re: DAL IMAP errors

2012-04-15 Thread Alan Etkin
Not fixed yet in trunk. There is a regex replacement proposal in the issue page by Massimo. El sábado, 14 de abril de 2012 22:44:41 UTC-3, pyhead escribió: Hi web2py users, db = DAL('imap://') successfully logs in to the mail server, but fails when the commonly used spaces or '.' are

[web2py]

2012-04-15 Thread Bruce Wade
Does web2py automatically save a cPickle in the database as gluon.storage? Because I saved ads with the web2py framework, however now when trying to load them with the old framework I get an error ImportError: No module named gluon.storage when I don't use gluon at all in that old framework. --

Re: [web2py] Re:

2012-04-15 Thread Bruce Wade
ads = [] if random_ads: for index, url in enumerate(random_ads): ads.append({ 'index': index, 'id': url['id'], 'url': url['url'], 'valid': '',

Re: [web2py] Re:

2012-04-15 Thread Anthony
And what are the index, url['id'], and url['url'] objects? Are any of them storage objects? On Sunday, April 15, 2012 8:19:45 PM UTC-4, Bruce Wade wrote: ads = [] if random_ads: for index, url in enumerate(random_ads): ads.append({

Re: [web2py] Re:

2012-04-15 Thread Bruce Wade
url['id'] = integer url['url'] = string On Sun, Apr 15, 2012 at 7:03 PM, Anthony abasta...@gmail.com wrote: And what are the index, url['id'], and url['url'] objects? Are any of them storage objects? On Sunday, April 15, 2012 8:19:45 PM UTC-4, Bruce Wade wrote: ads = []

[web2py] Re: Add conditional sub-menu

2012-04-15 Thread Cliff
Omi, Sorry, my bad. Been away. Should be: sub_menu = [('Admin', False, URL('admin'), []), ] # Added empty list On Thursday, April 12, 2012 9:43:39 AM UTC-4, Omi Chiba wrote: Cliff, Thank you for sharing code but now I got a different error. Maybe it cannot understand sub_menu

[web2py] Re: Browser back button: Reloading database results

2012-04-15 Thread Cliff
Good point. Also that is the rule of thumb for we applications. A request that can make a change to a resource should be a POST. A request to access a resource should be a GET. On Thursday, April 12, 2012 8:15:09 AM UTC-4, villas wrote: My conclusion is that it is better to submit search

[web2py] how to intercept password before encryption, if possible?

2012-04-15 Thread weheh
I'm building an administrative interface where only the admin can register new users. Upon registering a new user, the system will email login and initial temporary password to user. I'm using the auth_user table but with a customized form and create action. Is there a way to capture the

Re: [web2py] Re: Add conditional sub-menu

2012-04-15 Thread Omi Chiba
Cliff, Thanks ! I'm on vacation but I will try when I come back but I'm sure it works !! On Sun, Apr 15, 2012 at 9:52 PM, Cliff cjk...@gmail.com wrote: Omi, Sorry, my bad. Been away. Should be: sub_menu = [('Admin', False, URL('admin'), []), ] # Added empty list On Thursday,

Re: [web2py] how to intercept password before encryption, if possible?

2012-04-15 Thread Bruce Wade
use request.vars.password to get unencrypted and form.vars.password for encrypted if you use requires CRYPT() On Sun, Apr 15, 2012 at 8:06 PM, weheh richard_gor...@verizon.net wrote: I'm building an administrative interface where only the admin can register new users. Upon registering a new

[web2py] Re: how to intercept password before encryption, if possible?

2012-04-15 Thread Matt Gorecki
In one of my applications, I create users by hand as well with a custom form. My flow goes something like this: 1. Fill out the Create User form. There are is no password field here. 2. In the function that processes the form, I generate a random, readable password at the beginning. 3. Before

[web2py] Re: how to intercept password before encryption, if possible?

2012-04-15 Thread weheh
that makes sense. thanks! On Monday, April 16, 2012 11:39:52 AM UTC+8, Matt Gorecki wrote: In one of my applications, I create users by hand as well with a custom form. My flow goes something like this: 1. Fill out the Create User form. There are is no password field here. 2. In the

Re: [web2py] how to intercept password before encryption, if possible?

2012-04-15 Thread weheh
Thanks, Bruce. It's good to know where this is being stored. Actually, I like Matt's suggestion for auto-password generation. I'm doing this for a client and I assumed they wanted to choose the password, but Matt's approach makes more sense to me. On Monday, April 16, 2012 11:38:09 AM UTC+8,

[web2py] Re: DAL IMAP errors

2012-04-15 Thread Massimo Di Pierro
Will the proposed solution solve the problem? replace mailbox_name = mailbox.replace([, ).replace(], ).replace(/, _) with mailbox_name = re.sub('[^_\w]','',re.sub('[/ ]','_',mailbox)) On Sunday, 15 April 2012 18:40:29 UTC-5, Alan Etkin wrote: Not fixed yet in trunk. There is a regex

Re: [web2py] Re:

2012-04-15 Thread Anthony
I assume a Storage object got into some part of one of your ads objects somehow. How is the url object created? Aside from that insert code, is there any other code that updates the records? On Sunday, April 15, 2012 10:27:41 PM UTC-4, Bruce Wade wrote: url['id'] = integer url['url'] =

Re: [web2py] Re:

2012-04-15 Thread Bruce Wade
The code I showed you is exactly how ads are created and stored in the database. It is all through that code. The code that updates the code uses cPickle.loads and treats it like a python object updating the array then redumps it cPickle.dumps before saving. This is the exact same code I use in

[web2py] Re: vCard and vEvent

2012-04-15 Thread Annet
Hi Anthony, Thanks for your reply. You could do: {{if organization:}}FN: {{=organization.name}} ORG: {{=organization.name}}{{pass}} and you won't get any blank lines when there is an organization, but I think you'll still get two blank lines when there is no organization. This won't be

Re: [web2py] Re:

2012-04-15 Thread Anthony
The code I showed you is exactly how ads are created and stored in the database. It is all through that code. The code doesn't show how the random_ads object and the url objects it contains are created. The code that updates the code uses cPickle.loads and treats it like a python

Re: [web2py] Re:

2012-04-15 Thread Anthony
You might also try inspecting the contents of some of the records. Do all records include a Storage object, or just some? What part of the dumped ads object is a Storage object? This may provide some clues. Anthony On Monday, April 16, 2012 1:27:19 AM UTC-4, Anthony wrote: The code I showed

Re: [web2py] Re:

2012-04-15 Thread Bruce Wade
random ads web2py query: unseen_ads = unseen_ads_query.select(orderby='random', limitby=(0,5)) return unseen_ads update is pretty much the exact same code as provided before, with the different it appends to the list of ads it got from the database. today_ads =

[web2py] Re: vCard and vEvent

2012-04-15 Thread Anthony
Sorry, my mistake -- there is no context argument. Just pass the dict as an unnamed argument, or pass each item as its own keyword argument: response.render(dict(organization=session.organization, ...)) or just: response.render(organization=session.organization, ...) Side note: you don't need