Re: Webhelpers' h.link_to(_remote) escapes my URL :(

2007-05-05 Thread Christoph Haas
On Fri, May 04, 2007 at 12:58:07PM -0700, Shannon -jj Behrens wrote: > On 5/4/07, Christoph Haas <[EMAIL PROTECTED]> wrote: > > I have created a URL using information from Routes using h.url_for(). > > Example: > > > > /start/page?page_nr=1&called=back > > > > Now I want to create a link to th

Re: Using Mako templates

2007-05-05 Thread Christoph Haas
On Fri, May 04, 2007 at 12:43:47PM -0700, voltron wrote: > I´ll like to use only Mako templates in my projects, apart from > stating this in the middleware.py, do I have to change these lines in > the einviroment.py: > > # The following template options are passed to your template engines >

Re: Using Mako templates

2007-05-05 Thread voltron
Thank you very much for the tip Christoph. Hmm things like that should be documented somewhere On May 5, 12:08 pm, Christoph Haas <[EMAIL PROTECTED]> wrote: > On Fri, May 04, 2007 at 12:43:47PM -0700, voltron wrote: > > I´ll like to use only Mako templates in my projects, apart from > > stating

Re: Using Mako templates

2007-05-05 Thread Christoph Haas
On Sat, May 05, 2007 at 10:25:31AM -0700, voltron wrote: > Thank you very much for the tip Christoph. Hmm things like that should > be documented somewhere You are right. I added my hints to http://docs.pythonweb.org/display/pylonscookbook/Using+Mako+templating+language Christoph --~--~--

Routing -url_for

2007-05-05 Thread voltron
Hi all, on trying out some of the tutorials from the routes site, I noticed the use of the url_for function crashes the paster server: AttributeError: 'Mapper' object has no attribute 'url_for' How does one use this function in Pylons? Is it all all necessary? thanks --~--~-~--~~

Re: Routing -url_for

2007-05-05 Thread Christoph Haas
On Sat, May 05, 2007 at 12:01:13PM -0700, voltron wrote: > on trying out some of the tutorials from the routes site, I noticed > the use of the url_for function crashes the paster server: > > AttributeError: 'Mapper' object has no attribute 'url_for' Do you have example code that results in this

Re: Routing -url_for

2007-05-05 Thread voltron
Thanks. here is the code I used: map.connect('tada', '', controller='test', action='tada') map.url_for('tada') I am using EasyEclipse wth PyDev on windows On May 5, 9:05 pm, Christoph Haas <[EMAIL PROTECTED]> wrote: > On Sat, May 05, 2007 at 12:01:13PM -0700, voltron wrote: > > on trying ou

Clean url mapping

2007-05-05 Thread voltron
I´m trying map clean urls with no luck, Its definately something I do not understand in routes. # controller class TestController(BaseController): def index(self): return Response('boomer') def tada1(self): return Response('tada1') def tada2(self): return Respo

[RFC] Alternative paginator

2007-05-05 Thread Christoph Haas
Dear list... as some of you already know I have never been very happy with Webhelpers' built-in pagination module. So I wrote my own (that is NOT compatible with the existing one) and I love it so far. Interested? Get it from http://workaround.org/pylons/paginator/ and let me know what you think

Re: JavaScript error when using Pylons, WebHelpers and Mako

2007-05-05 Thread [EMAIL PROTECTED]
On 3 mai, 23:23, Michael Bayer <[EMAIL PROTECTED]> wrote: > On May 3, 2007, at 3:00 PM, Michael G. Noll wrote: > > > > > > > Here's the snippet of my Mako template to output the required > > JavaScript via WebHelpers: > > > === snipp > > ${h.link_to_function("?", > >

Re: Routing -url_for

2007-05-05 Thread Shannon -jj Behrens
It's "h.url_for", not "map.url_for". Best Regards, -jj On 5/5/07, voltron <[EMAIL PROTECTED]> wrote: > > Thanks. here is the code I used: > > map.connect('tada', '', controller='test', action='tada') > map.url_for('tada') > > I am using EasyEclipse wth PyDev on windows > > > > On May 5, 9:05 p

Re: Webhelpers' h.link_to(_remote) escapes my URL :(

2007-05-05 Thread Shannon -jj Behrens
On 5/5/07, Christoph Haas <[EMAIL PROTECTED]> wrote: > > On Fri, May 04, 2007 at 12:58:07PM -0700, Shannon -jj Behrens wrote: > > On 5/4/07, Christoph Haas <[EMAIL PROTECTED]> wrote: > > > I have created a URL using information from Routes using h.url_for(). > > > Example: > > > > > > /start/p

Re: Using encoded forward slashes in a URL?

2007-05-05 Thread Ian Bicking
Evert Rol wrote: >Hi all, > > I'm having a problem with encoded forward slashes in a URL. That is, > I need to pass an 'id' that has encoded forward slashes in its name, > but this results in routes not being be able map the URL: apparently > it sees another subset of paths in the URL,

Re: Spawning a worker thread from the controller?

2007-05-05 Thread Shannon -jj Behrens
If you set "self.status", it *shadows* any value that was set on the class. Hence, you'll have a value set on the class *and* a value set on the instance. That's not going to help you if you're looking for the status in the wrong instance ;) If ClassName.status didn't work, I'm worried that's b

Re: Spawning a worker thread from the controller?

2007-05-05 Thread Shannon -jj Behrens
You're not using mod_python or something, are you? I was assuming you were using "paster serve" which uses a single interpreter instance. By the way, if the class member thing is throwing you off, you can also try using a module-level variable. Best Regards, -jj On 5/4/07, Matt Billenstein <[EM

close open tags in mako like genshi's HTML?

2007-05-05 Thread Qiangning Hong
I'm porting from genshi to mako for my blog application, and found two important features lack in mako: 1. auto html escaping. I must escape explicitly in mako to avoid XSS attack. It's error-prone, but i can live with that. 2. auto close open tags in HTML. In genshi, HTML() function will clo

Re: Routing -url_for

2007-05-05 Thread voltron
Aha! Thanks, I was reading the tutorial from the routes site, I did not know that these functions were imported as h from routes import url_for import firstapp.lib.helpers as h # in base.py On May 6, 2:25 am, "Shannon -jj Behrens" <[EMAIL PROTECTED]> wrote: > It's "h.url_for", not "map.url_for

Re: Alternative paginator

2007-05-05 Thread voltron
Do you have examples of its use? Thanks. I apologize for my newbiness, new to Pylons and all On May 5, 10:07 pm, Christoph Haas <[EMAIL PROTECTED]> wrote: > Dear list... > > as some of you already know I have never been very happy with > Webhelpers' built-in pagination module. So I wrote my own (

WebHelpers

2007-05-05 Thread voltron
I can´t seem to find any docs on Webhelpers. I would like to use Mochikit in Pylons, are there examples or tutorials that one could point me to? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "pylons-discus