Re: How import Python packages to Mako

2010-05-17 Thread Eryx Lee
import html in Mako: <%! from html import HTML h = HTML() %> a test ${str(h.p('hello world!\n'))|n} On Mon, May 17, 2010 at 10:22 PM, Mario Moura wrote: > Hi Folks > > I want use html 1.11 from Package Index inside mako. (and anothers > packages) > > Is it possible? how? > > http://py

Quickwiki models

2010-05-17 Thread Yang Zhang
I'm following the quickwiki tutorial at http://pylonshq.com/docs/en/1.0/tutorials/quickwiki_tutorial/ but I don't see the imports into model/__init__.py that they assume (sqlalchemy as sa, meta.metadata), hence the tutorial seems broken wrt the code base. Am I missing something? Thanks in advance.

Re: helpers and link_to

2010-05-17 Thread Matt Feifarek
On Mon, May 17, 2010 at 11:10 AM, gazza wrote: > [${h_link_to('review > order',h.url_for(controller='client',action='clientorderlist',id=c.id))}] Can't you just to the following? ${h_link_to('review order', '%s' % h.url_for(controller='client',action='clientorderlist',id=c.id))} -- You receiv

Re: Paster not shutting down properly because of background threads

2010-05-17 Thread Martine
On May 13, 11:05 am, Marius Gedminas wrote: > Threads that you started manually, right? Yes. > I don't know how to reliably trap the server shutdown, though.  It > depends on the particular server you're using to serve your WSGI app, I > suppose.  (For the same reason I'm also not sure it's saf

helpers and link_to

2010-05-17 Thread gazza
Hello, I am having a wee problem attempting to merge a css span object with a helper link_to method. I have: Click to review order and [${h_link_to('review order',h.url_for(controller='client',action='clientorderlist',id=c.id))}] not sure how to merge them both together. Appreciate any guida

How import Python packages to Mako

2010-05-17 Thread Mario Moura
Hi Folks I want use html 1.11 from Package Index inside mako. (and anothers packages) Is it possible? how? http://pypi.python.org/pypi/html Regards Mario macm -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send em

Re: Best way to setup a Pylons site for dual ssl/non-ssl access...

2010-05-17 Thread blaf
Hi Bruce, I'm currently using pylons+mod_wsgi+apache2 for a project where I needed something like what you're asking. It probably exists a lot of ways for doing this begining with the use of the @https decorator included in pylons. I'm using a derived version of this decorator because I needed not

Re: Formencode array validation

2010-05-17 Thread Mike Burrows
Take a look at Formencode.foreach.ForEach. According to the docs (http://formencode.org/Validator.html) you can use it to define repeating forms or (more conventionally) repeating groups within a form. In the latter case you will want this at the top of your form schema: pre_validators = [v

Best way to setup a Pylons site for dual ssl/non-ssl access...

2010-05-17 Thread BruceC
Hi all, I am trying to design a Pylons application that would allow me to have a public non-ssl website and a private ssl-enabled administration section, & I'm interested in some best-practice suggestions... The idea would be that the public could go to http://www.mysite.com to view the public we