[web2py] Re: JQUERY as response in Ajax call?

2013-05-09 Thread Niphlod
if you're using components, use response.js . http://web2py.com/books/default/chapter/29/12?search=response.js On Friday, May 10, 2013 7:10:31 AM UTC+2, Mika Sjöman wrote: > > Hi > > I am trying to close a window title dialog with JQUERY after sucessuflly > updating a clients phone number. Th

Re: [web2py] Re: Migrations Problem: two fields added, two not added

2013-05-09 Thread Manuele Pesenti
Hi! I got quite the same problem with postgresql. I tried to add a field to an already defined table but I fot this error: ProgrammingError: ERRORE: la colonna plugin_lookout_fields.table_meta_data non esiste LINE 1: ...s.field_comment, plugin_lookout_fields.is_active, plugin_loo... (it says tha

[web2py] JQUERY as response in Ajax call?

2013-05-09 Thread Mika Sjöman
Hi I am trying to close a window title dialog with JQUERY after sucessuflly updating a clients phone number. The problem is that after I successfully update the data I send this as a response to the browser: message = "jQuery('#windowTitleDialog').toggle('slow');" return message But the

[web2py] Re: Does layout.html have a corresponding controller?

2013-05-09 Thread Anthony
You've got it somewhat backwards -- views don't have controller functions -- controller functions have views. In other words, URLs that come into web2py do not specify a particular view being requested but instead specify a particular controller and function. Typically the function will then hav

[web2py] Does layout.html have a corresponding controller?

2013-05-09 Thread Bob Babby
I want to add a search bar to my all my pages. I think the best way to do this is by adding it to the layout.html from which all my other html views extend from. The problem I can't figure out is where to put the corresponding controller function. For all the other views, the controller functio

[web2py] Controller for layout.html?

2013-05-09 Thread Bob Babby
Sorry if this is a repost. My last post wasn't showing up for some reason. I want to add a search bar to all my pages. To do this I plan on adding an input text to layout.html (all my pages extend layout.html). But where is the controller for layout.html so that I can build the htmlhelpers and

[web2py] Re: superfish.css overridden : menu sent to back of jqgrid

2013-05-09 Thread Patrick Patel
Wow, that was extraordinarily helpful! Thanks so much... On Saturday, July 16, 2011 6:59:33 AM UTC-7, Vineet wrote: > > Hello List ! > I am trying to facelift my app by completely overriding the > superfish.css. > In most of the forms, the new-look menu is working superbly. > But only in thos

[web2py] German TranslationFile für admin

2013-05-09 Thread Klaus Kappel
hi there, here is a german language file the admin-app. If someone could share some helper scripts, for example to get rid of obsolete strings, i would appreciate that. cu, Klaus Kappel -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group.

[web2py] Re: In openshift: Need help on why my web2py website is being constantly accessed by openshift itself

2013-05-09 Thread smoggy
I've checked ./haproxy-1.4/conf/haproxy.cfg and I indeed had listen express 127.9.181.130:8080 option httpchk GET / i commented that in order to get only tcp based checks instead of http ones to keep the logs cleaner. After restarting the cartridge with "rhc cartridge reload haproxy-1.4 -

[web2py] Re: How can Web2py prevent web scraping?

2013-05-09 Thread Derek
I've read an idea about using a 'ticket' system... each session gets X # of tickets. Tickets regenerate at a fixed rate. Normal users would never run out of tickets. Each query operation would have a fixed cost of tickets. Inserts would cost double selects... You don't have to calculate regener

[web2py] Re: (1/2 OT) Bug in production? [nginx + uwsgi]

2013-05-09 Thread Jose
El jueves, 9 de mayo de 2013 19:52:47 UTC-3, Jose escribió: > > Hello, > > The normal behavior is: The user presses the Test button, then id="sql"> show "ABCD". (The code is shown below) > > In development mode running rocket, works well, but in production ajax > call is not executed. > > > Env

[web2py] (1/2 OT) Bug in production? [nginx + uwsgi]

2013-05-09 Thread Jose
Hello, The normal behavior is: The user presses the Test button, then show "ABCD". (The code is shown below) In development mode running rocket, works well, but in production ajax call is not executed. Environment: Web2py 2.4.6 (Version 2.4.6-stable+timestamp.2013.05.08.16.52.12) FreeBSD 9.1

[web2py] Re: How can Web2py prevent web scraping?

2013-05-09 Thread Niphlod
for "kind" agents a robots.txt suffice. for inconsiderate harvester, usually that kind of work is addressed by either the firewall or the webserver. in web2py either you evaluate the user agent for every request and cut it to a "HTTP(500)" in models or you implement your own rate-limiting, that

[web2py] Re: In openshift: Need help on why my web2py website is being constantly accessed by openshift itself

2013-05-09 Thread Andrew Replogle
If you're using haproxy are you sure it's not the heartbeat check? On Wednesday, May 8, 2013 5:10:51 AM UTC-5, smoggy wrote: > > Hi folks, > > So in openshift in a python 2.6 cartridge + haproxy i'm having lots of > accesses from openshift ip itself, like one every 3 seconds. I do not have > any

[web2py] Re: Possible problem with cron using python 2.7.3 and Ubuntu 12.04

2013-05-09 Thread goome
I got the same error with the same python and ubuntu. did you solve in some manner? Thanks Il giorno lunedì 7 maggio 2012 05:40:11 UTC+2, Nick Noel ha scritto: > > Hello, > I find that I get the following error on startup: > > Starting hardcron... > please visit: > http://127.0.0.1:8000 >

[web2py] Re: Dynamically change highlighted class for response.menu

2013-05-09 Thread Omi Chiba
>Niphlod Thank you !! It's perfect now. >Paolo Thank you for the reference that's look easier too especially for someone like me who's not javascript gulu. On Thursday, May 9, 2013 1:55:00 PM UTC-5, Niphlod wrote: > > > jQuery(function() { > var path = location.pathname.substring(1); >

[web2py] How can Web2py prevent web scraping?

2013-05-09 Thread Alex Glaros
What techniques can be used in a Web2py site to prevent data mining by harvester bots? In my day job, if the Oracle database slows down, I go to the Unix OS, see if the same IP address is doing a-lot-faster-than-a-human-could-type queries, and then block that IP address in the firewall. Are

[web2py] Re: Dynamically change highlighted class for response.menu

2013-05-09 Thread Niphlod
jQuery(function() { var path = location.pathname.substring(1); if ( path ) { var els = jQuery('ul.nav a[href$="'+path+'"]').filter( "[rel!=nofollow]"); if (els.length != 0) { els.find('span').addClass('highlighted'); } else { jQuery('#default

[web2py] dealing with legacy tables with strange names

2013-05-09 Thread Massimo Di Pierro
Many of you have complained about the pain of having to deal with table with strange names for example table names containing a ".". There is a quick solution in trunk: # assuming db =DAL() db.define_table('owner',Field('name')) db.define_table('thing',Field('name'),Field('owner','reference owner

[web2py] Re: Dynamically change highlighted class for response.menu

2013-05-09 Thread Paolo Caruccio
for a pyhon solution (not involving javascript) you could check this argument https://groups.google.com/d/topic/web2py/8AHYqV_EKy0/discussion Il giorno martedì 7 maggio 2013 17:56:10 UTC+2, Omi Chiba ha scritto: > > I have a fol

Re: [web2py] upgrade web2py

2013-05-09 Thread Richard Vézina
Hello, I don't think it a good idea to use the upgrade feature. Last version of web2py is 2.4.6 and 1.99.4 is pretty old and the upgrade feature may be buggy. Also consider that you may or may not need to update python interpreter in order to use web2py 2.4.6 to access new feature in this version.

[web2py] upgrade web2py

2013-05-09 Thread George Hellman
I am trying to upgrade web2py automatically I am running "Version 1.99.4" " Running on Apache/2.2.20 (Ubuntu)" (ubuntu server) with full root access. It says: "Checking for upgrades..." or, if there is an upgrade button, it does not upgrade. This may have to do with "file locking" as on pos

[web2py] Re: Dynamically change highlighted class for response.menu

2013-05-09 Thread Niphlod
I will but you have to wait a few hours for me to get back home :( Il giorno giovedì 9 maggio 2013 15:34:10 UTC+2, Omi Chiba ha scritto: > > Oh, actually it's not working for me > It was working fine with the previous code except default home but now it > doesn't highlight the menu at all. >

[web2py] Re: Dynamically change highlighted class for response.menu

2013-05-09 Thread Omi Chiba
Worked! Thank you~! On Thursday, May 9, 2013 3:38:41 AM UTC-5, Niphlod wrote: > > it's exactly working as expected with the latest snippet. > > Il giorno giovedì 9 maggio 2013 00:15:38 UTC+2, Omi Chiba ha scritto: >> >> Thank you for the additional explanation. >> >> I just want to highlight the h

Re: [web2py] Re: Web Frameworks Performance

2013-05-09 Thread Alexei Vinidiktov
I run a small website in a Linux VM on Azure with WSGI. Seems to work fine. It's just a VM as any other. On Thu, May 9, 2013 at 2:56 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Just some comments about 4. Web2py was not meat as a teacher tool. Web2py > was meant to enforce good

Re: [web2py] In openshift: Need help on why my web2py website is being constantly accessed by openshift itself

2013-05-09 Thread smoggy
=30568): Unable to read WSGI request. [Wed May 08 19:30:29 2013] [error] [client 127.9.181.129] (32)Broken pipe: mod_wsgi (pid=8717): Unable to send request details to WSGI daemon process '516332d0e0b8cd9f14000160' on '/var/lib/openshift/516332d0e0b8cd9f14000160/python-2.6/logs/

[web2py] Re: What would be the best way to optimize/resize images after upload

2013-05-09 Thread Niphlod
there's also a /contrib/imageutils.py ready to use. Il giorno giovedì 9 maggio 2013 07:22:06 UTC+2, weheh ha scritto: > > There are numerous ways to resize uploaded images. Some are done via the > web server. Others are done within the app. For a couple of my apps I use > the python PIL package

[web2py] Re: Dynamically change highlighted class for response.menu

2013-05-09 Thread Niphlod
it's exactly working as expected with the latest snippet. Il giorno giovedì 9 maggio 2013 00:15:38 UTC+2, Omi Chiba ha scritto: > > Thank you for the additional explanation. > > I just want to highlight the home by defaut only first time user access > the page. It should be removed when user clic

Re: [web2py] Re: _after_delete callback - how to access info of deleted Set?

2013-05-09 Thread Niphlod
uhm. please take into consideration that you can't hook to the "after_delete" callback if you still want to access the record that has been deleted.. use before_delete for that case. Il giorno giovedì 9 maggio 2013 01:40:49 UTC+2, Jurgis Pralgauskis ha scritto: > > Thanks, > > hm, ok, my u