i18n request.languages - pylons 0.9.7

2009-02-09 Thread Uwe Feldtmann
My browser sends the following accept-language string in the header Accept-Language: en,en-us;q=0.8,ar;q=0.5,ta;q=0.3 Here is a scaled down controller from pylons import request ...more imports here class LoginController(BaseController): def index(self): print 'header:',

Re: beaker_cache query_args when duplicate queries are in

2009-02-09 Thread Wichert Akkerman
Previously eleith wrote:  My solution was to write my own decorator. could you share your decorator? For what it's worth below is my variant of beaker_cache. It has the advantage over the stock version that it works everywhere instead of only for controller methods and will never try to cache

webhelpers select function wont take a string as a default

2009-02-09 Thread Damian
Hi, Been banging my head against this for a bit - the following code in mako: % selectvals = {'U':'Not specified','M':'Male','F':'Female'} % ${selectvals[c.Gender]} - change to: ${h.select('gender', c.Gender, selectvals.items())} (where c.Gender is set to 'F' for

Re: webhelpers select function wont take a string as a default

2009-02-09 Thread Damian
Same with 0.6.4 for that matter. On Feb 9, 12:59 pm, Damian damiandimm...@gmail.com wrote: Hi, Been banging my head against this for a bit - the following code in mako:     %       selectvals = {'U':'Not specified','M':'Male','F':'Female'}     %      ${selectvals[c.Gender]}      -

Re: HOWTO: Installing Pylons on Hardy

2009-02-09 Thread Joshua D. Drake
On Sat, 2009-02-07 at 09:45 -0800, Mike Orr wrote: Yes, this is a better way. Eventually you will have multiple applications, and at some point you'll want to upgrade one while another is still using older APIs. Even Setuptools has this problem periodically, in that newer versions of

Re: storing formattable strings in the config file?

2009-02-09 Thread Jonathan Vanasco
that only sort-of-works: i have to do it like this: stringed= (config['varname']).replace( '\\x25', '%' ) print stringed % {dict} better than nothing, but it would be nice if there were a better option. --~--~-~--~~~---~--~~ You received this message because you

Re: HOWTO: Installing Pylons on Hardy

2009-02-09 Thread Joshua D. Drake
On Sat, 2009-02-07 at 23:18 +0100, Piotr Ozarowski wrote: [Mike Orr, 2009-02-07] Ah, it's been a long time since I've seen a Linux system where the user and system administrator weren't the same person. well, sometimes it needs some work to glue different Python modules and applications

Routes problem (not thread safe?)

2009-02-09 Thread carlos
Hi, I'm using Pylons 0.9.6.1, with Routes 1.7.3 and Python 2.5. I'm testing an application which uses AJAX to display information, and it makes many request asynchronously. It works fine, but some times randomly the server raises an exception in a GET request, always the same exception at

issue on upgrading to 0.9.7

2009-02-09 Thread Jonathan Vanasco
this is a little complex, so bear with me... we developed a 'framework' that runs on pylons and consolidates core functionality for the kind of webapps we build or consult on. something peculiar to the framework is that we need to access the real application's model , helpers , etc from the

Re: HOWTO: Installing Pylons on Hardy

2009-02-09 Thread Piotr Ozarowski
[Joshua D. Drake, 2009-02-09] On Sat, 2009-02-07 at 23:18 +0100, Piotr Ozarowski wrote: [Mike Orr, 2009-02-07] Ah, it's been a long time since I've seen a Linux system where the user and system administrator weren't the same person. well, sometimes it needs some work to glue

Re: Routes problem (not thread safe?)

2009-02-09 Thread Philip Jenvey
On Feb 9, 2009, at 2:47 AM, carlos wrote: Hi, I'm using Pylons 0.9.6.1, with Routes 1.7.3 and Python 2.5. inspecting de variables with the traceback debugger, I see that var is always a str, but self.prior is sometimes a dict ( {'type': ':', 'name': 'format'} ) and sometimes a str (but it

Re: HOWTO: Installing Pylons on Hardy

2009-02-09 Thread Mike Orr
On Mon, Feb 9, 2009 at 8:56 AM, Joshua D. Drake j...@commandprompt.com wrote: This is interesting. To me the direction this thread took is in reverse. Things should be installed globally. It is part of production. You define your deployment, your dependencies and that is what you get. That

Re: webhelpers select function wont take a string as a default

2009-02-09 Thread Mike Orr
On Mon, Feb 9, 2009 at 4:59 AM, Damian damiandimm...@gmail.com wrote: Hi, Been banging my head against this for a bit - the following code in mako: % selectvals = {'U':'Not specified','M':'Male','F':'Female'} % ${selectvals[c.Gender]} - change to: