[web2py] Is it possible to LOAD a component after a page has rendered?

2012-01-28 Thread scausten
I'd like to asynchronously load one of a choice of components into a view, based on a user selection after the page has loaded. It's relatively trivial to do this by changing the src on an iFrame which embeds the component view, but this doesn't feel like a web2py-ish way of doing things. It

[web2py] Re: Is it possible to LOAD a component after a page has rendered?

2012-01-28 Thread apple
web2py_ajax_page(get, URL, null , DIV_ID) This function is included in web2py.js On Jan 28, 10:03 am, scausten scaus...@gmail.com wrote: I'd like to asynchronously load one of a choice of components into a view, based on a user selection after the page has loaded. It's relatively trivial to

[web2py] Re: Is it possible to LOAD a component after a page has rendered?

2012-01-28 Thread Alan Etkin
You can use javascript onclick and the web2py.js function web2py_component(action,target) to load the source on demand. You need to set a target div or other element in the view previously and get the triggered event's DOM element id with jQuery to pass it with the url/action string.

[web2py] DAL and date calculations

2012-01-28 Thread Ed Greenberg
Using the DAL, I'd like to select records that are less than some interval old, or newer than a certain date. My records have a datetime field in them. So I want something like: select * from table where mydate (now()-interval 1 day) Can I do this in the dal, or do I have to use raw sql?

[web2py] Many apps but only one needs https.

2012-01-28 Thread António Ramos
Hello, if i have 20 apps in the same server of web2py and only one needs to be accessed with https what do i do? Thank you António

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

2012-01-28 Thread Phyo Arkar
its 2.7 as all my servers are (distro default) On Thu, Jan 26, 2012 at 3:22 PM, Phyo Arkar phyo.arkarl...@gmail.comwrote: I am using 1.99.1 and it happens to me frequently. If download is big ( for my case 100,200 MB) it usually end up with corrupted file. Tested on Local wifi network with

Re: [web2py] DAL and date calculations

2012-01-28 Thread Bruce Wade
today = datetime.date.today() yesterday = today - datetime.timedelta(1) today_ads = self.db(db.table.date yesterday).select().first() On Sat, Jan 28, 2012 at 6:35 AM, Ed Greenberg greenberg...@gmail.comwrote: Using the DAL, I'd like to select records that are less than some interval old, or

[web2py] Problem with the audio tag, web2py and Firefox

2012-01-28 Thread Magnitus
I recently read a book about html 5 and promptly started using some of the features described in my project. I experienced a problem with the audio tag and Firefox which I reduced to a minimalistic example illustrating the problem. *The experiment:* *1) Control Situation* I put

[web2py] ssh tunnel to admin panel with lighttpd= ERROR:web2py.cache:corrupted file

2012-01-28 Thread Benjamin
Hello guys, Attracted by web2py dev possibilities I couldn't resist ;-) But unfortunately deployment is a whole other story and I'm having major difficulties. So after a struggle I got web2py to run on lighttpd, then discovered that, as I didn't set any SSL, I couldn't access the admin

[web2py] Re: ssh tunnel to admin panel with lighttpd= ERROR:web2py.cache:corrupted file

2012-01-28 Thread Massimo Di Pierro
Can you try delete applications/admin/cache/*? it is possible that there is a cache file created using a different python version and web2py cannot open it. For permission issues it may be unable to remove it and re-create it. On Jan 28, 12:25 pm, Benjamin benjamin.aguet...@gmail.com wrote:

[web2py] reload just div id='page' via ajax (not entire page)

2012-01-28 Thread Vineet
I have an observation. When we jump from one view to another, the entire page gets reloaded. Whereas, it should be sufficient to reload just div id='page' via ajax. Any particular reason as to why the entire page is reloaded every time? For my purpose, on every request, how do I load only div

Re: [web2py] reload just div id='page' via ajax (not entire page)

2012-01-28 Thread Bruce Wade
I am pretty sure every page is reloaded every time is because their is no guaranty that every single person who uses the framework will use a div id=page etc... or the same layout for that matter. If you want to refresh only the div id=page then you would have to write your application in a way

[web2py] Re: reload just div id='page' via ajax (not entire page)

2012-01-28 Thread Vineet
Whatever the authorities assigned to users, irrespective of that, every user will be using the same flash, footer, header, superfish, etc. Considering this, why to reload those common divs (which won't change with different users) add the overhead?

Re: [web2py] Re: reload just div id='page' via ajax (not entire page)

2012-01-28 Thread Bruce Wade
Really every user? I don't use the same footer, header or superfish. The sites I work on are completely different. On Sat, Jan 28, 2012 at 12:34 PM, Vineet vineet.deod...@gmail.com wrote: Whatever the authorities assigned to users, irrespective of that, every user will be using the same flash,

[web2py] Any advice on spam control for a comment system?

2012-01-28 Thread monotasker
I'm about to deploy a simple blog platform for myself and have implemented comments using something very much like Massimo's example in the components chapter of the web2py book. What I'm wondering about, though, is spam control. At the moment I think I'm just going to activate recaptcha for

[web2py] Re: reload just div id='page' via ajax (not entire page)

2012-01-28 Thread Cliff
How will you degrade for users who have turned off Javascript? On Jan 28, 3:34 pm, Vineet vineet.deod...@gmail.com wrote: Whatever the authorities assigned to users, irrespective of that, every user will be using the same flash, footer, header, superfish, etc. Considering this, why to reload

[web2py] Re: reload just div id='page' via ajax (not entire page)

2012-01-28 Thread pbreit
Because that's how 99.9% of websites function.

[web2py] Re: Any advice on spam control for a comment system?

2012-01-28 Thread pbreit
I would suggest avoiding captcha until you prove to yourself that you have a problem. Akismet is targeted at comment spam in particular: http://akismet.com/ If you do need something, captcha is probably the worst choice you can make since it's aggravating to legitimate users. Here's a simple

[web2py] Re: model less apps (a blog example)

2012-01-28 Thread pbreit
Interesting, thanks for putting that together. I'm starting to understand the other approach better but it is quite a departure from what I do now. Look forward to seeing performance results.

Re: [web2py] Web2py in large web scenarios

2012-01-28 Thread Vinicius Assef
I'd use folders inside models. I think I'd use web2py infrastructure that's already available to me. And, AFAIK, /modules were not planned for that. Except for pluggable apps. -- Vinicius Assef. On Fri, Jan 27, 2012 at 10:35 PM, Bruno Rocha rochacbr...@gmail.com wrote: I am using /models

Re: [web2py] Web2py in large web scenarios

2012-01-28 Thread Bruno Rocha
submodels are good, but you cant import models. So you cant reuse code. you end with too much repetition. in modules you can have a DRY structure. https://github.com/rochacbruno/web2py_model_less_app http://zerp.ly/rochacbruno Em 28/01/2012 23:00, Vinicius Assef vinicius...@gmail.com escreveu:

[web2py] Usage errors printed to console

2012-01-28 Thread Ross Peoples
I pulled from trunk a week or so ago and ever since, I've been getting this every few minutes printed to the console: WARNING:web2py.cron:WEB2PY CRON Call returned code 2: -J is reserved for Jython usage: /usr/bin/python [option] ... [-c cmd | -m mod | file | -] [arg] ... Try `python -h' for

[web2py] Re: reload just div id='page' via ajax (not entire page)

2012-01-28 Thread Rich
Is there no theming layer in web2py.. just a noob here but this seems like a theming issue. Rendering links and such to either reload everything or do an ajax thing should be handled in the theme... Best regards, Rich On Jan 28, 3:15 pm, Vineet vineet.deod...@gmail.com wrote: I have an

[web2py] Re: Monitoring memory usage leaks

2012-01-28 Thread Joseph Jude
There is an option -F filename while starting web2py. Is there any documentation (or pointers) about how to use it? Thank you, Joseph http://www.jjude.biz

[web2py] ticket with book example under 7.2.6 Links to Referencing Records

2012-01-28 Thread DenesL
As reported in the Spanish group, the example under section 7.2.6 Links to Referencing Records, calling the list_records action with a query var, e.g.: http://127.0.0.1:8000/test/test/list_records/person?query=person.id0 Traceback (most recent call last): File

[web2py] Re: ticket with book example under 7.2.6 Links to Referencing Records

2012-01-28 Thread Anthony
Have you tried it with the latest trunk? On Saturday, January 28, 2012 10:27:45 PM UTC-5, DenesL wrote: As reported in the Spanish group, the example under section 7.2.6 Links to Referencing Records, calling the list_records action with a query var, e.g.:

[web2py] Re: Problem with the audio tag, web2py and Firefox

2012-01-28 Thread Magnitus
Ah, obviously, the default server is Rocket, not Tornado (sorry for the typo, I guess Tornado just sounds cooler :P). Anyways, I guess I'll test it on my web2py+Apache node next time I do an update on it in order to isolate the server variable.

[web2py] 'Morsel' object has no attribute 'split' ?

2012-01-28 Thread Ben Tammetta
Hello, I am using the code provided here to create a web2py facebook application https://github.com/pythonforfacebook/facebook-sdk/blob/master/facebook.py When I call this function inside of facebook.py . testvar = facebook.get_user_from_cookie(request.cookies, FACEBOOK_APP_ID,