Re: Webhelpers html tag examples

2011-09-09 Thread Mike Orr
On Thu, Sep 8, 2011 at 6:00 PM, cd34 wrote: > On Sep 8, 7:44 am, Ben Sizer wrote: >> So, again (not directed to you, Chris): are there any examples of >> people using the webhelpers.html.tag stuff with Pyramid? :) > > http://groups.google.com/group/pylons-discuss/msg/d711428e505072b5 > > This ena

Re: Webhelpers html tag examples

2011-09-08 Thread cd34
On Sep 8, 7:44 am, Ben Sizer wrote: > So, again (not directed to you, Chris): are there any examples of > people using the webhelpers.html.tag stuff with Pyramid? :) http://groups.google.com/group/pylons-discuss/msg/d711428e505072b5 This enables webhelpers in a very minimal project. -- You rec

Re: Webhelpers html tag examples

2011-09-08 Thread Mike Orr
Two other things about auto-escaping. The Pyramid and Mako default is to convert ``None`` to ``u'None'``. The Pylons default (i.e., Pylons' Mako configuration) is to convert ``None`` to ``u''``. To get the None-to-"" conversion, you have to replace the default filter with ``markupsafe.escape_silen

Re: Webhelpers html tag examples

2011-09-08 Thread Mike Orr
On Thu, Sep 8, 2011 at 4:51 AM, Ben Sizer wrote: > On Sep 1, 2:32 am, cd34 wrote: >> Also, I use deform with both Mako and Jinja2, >> and unless you need to change the widgets, it doesn't really matter >> much that the templates use chameleon. I've written several projects >> and except for one m

Re: Webhelpers html tag examples

2011-09-08 Thread Mike Orr
On Tue, Aug 30, 2011 at 9:36 AM, Ben Sizer wrote: > On Aug 30, 2:42 pm, Benjamin Sims wrote: >> >> The demo site provides nice examples of its capabilities: >> >> http://deformdemo.repoze.org/ > > Having explored this a little more, I must admit I find it daunting. > Sure, for simple stuff it's "

Re: Webhelpers html tag examples

2011-09-08 Thread Robert Forkel
You'll have to use a filter to include rendered deform forms in a mako template, like so ${form.render()|n} The n-filter prevents escaping. regards robert On Thu, Sep 8, 2011 at 1:51 PM, Ben Sizer wrote: > On Sep 1, 2:32 am, cd34 wrote: >> Also, I use deform with both Mako and Jinja2, >> and

Re: Webhelpers html tag examples

2011-09-08 Thread Ben Sizer
On Sep 1, 2:32 am, cd34 wrote: > Also, I use deform with both Mako and Jinja2, > and unless you need to change the widgets, it doesn't really matter > much that the templates use chameleon. I've written several projects > and except for one minor case, haven't modified the templates. That's what

Re: Webhelpers html tag examples

2011-09-08 Thread Ben Sizer
On Aug 31, 4:54 pm, Chris McDonough wrote: > On Wed, 2011-08-31 at 06:29 -0700, Ben Sizer wrote: > > For the record:  https://github.com/mfeif/deform_mako(replaces the > Chameleon templates).  Deform is extensible this way, as it mentions in > its docs. > > But really the minute someone starts bum

Re: Webhelpers html tag examples

2011-09-01 Thread Mark
Hi Ben, I totally feel you. I had this same issue with Pylon's FormEncode initially. I had a hard time customizing it for my needs and was unable to get it working properly with AJAX. In the end I just gave up and designed my form the old-fashion way, in my opinion, the best way. You are right

Re: Webhelpers html tag examples

2011-08-31 Thread cd34
virtualenv --no-site-packages newenv source bin/activate paster create -t pyramid_routesalchemy webhelp cd webhelp/webhelp edit webhelp/development.ini and put near the top: mako.directories = webhelp:templates edit webhelp/webhelp/__init__.py and put: config.add_subscriber('webhelp.subscribers

Re: Webhelpers html tag examples

2011-08-31 Thread Chris McDonough
On Wed, 2011-08-31 at 06:29 -0700, Ben Sizer wrote: > On Aug 30, 2:09 pm, Ben Sizer wrote: > > I'm putting together a form, and looking for ways to do it, and > > although I'm used to just writing the HTML by hand, I'll happily use > > something to generate it also. The webhelpers.html.tag stuff l

Re: Webhelpers html tag examples

2011-08-31 Thread Ben Sizer
On Aug 30, 2:09 pm, Ben Sizer wrote: > I'm putting together a form, and looking for ways to do it, and > although I'm used to just writing the HTML by hand, I'll happily use > something to generate it also. The webhelpers.html.tag stuff looks > like it would work: but are there any examples of peo

Re: Webhelpers html tag examples

2011-08-30 Thread cd34
On Aug 30, 12:36 pm, Ben Sizer wrote: > On Aug 30, 2:42 pm, Benjamin Sims wrote: > > The demo site provides nice examples of its capabilities: > > >http://deformdemo.repoze.org/ > > Having explored this a little more, I must admit I find it daunting. > Sure, for simple stuff it's "easier than bui

Re: Webhelpers html tag examples

2011-08-30 Thread cd34
On Aug 30, 12:22 pm, Ben Sizer wrote: > On Aug 30, 5:08 pm, cd34 wrote: > > > If you're just looking to use webhelpers in your existing forms, you > > would add it to your subscribers: > > > something like: > > > project/lib/subscribers.py: You would create that file in the lib directory (if you

Re: Webhelpers html tag examples

2011-08-30 Thread Ben Sizer
On Aug 30, 2:42 pm, Benjamin Sims wrote: > > The demo site provides nice examples of its capabilities: > > http://deformdemo.repoze.org/ Having explored this a little more, I must admit I find it daunting. Sure, for simple stuff it's "easier than building HTML by hand", but for anything non-trivi

Re: Webhelpers html tag examples

2011-08-30 Thread Ben Sizer
On Aug 30, 5:08 pm, cd34 wrote: > If you're just looking to use webhelpers in your existing forms, you > would add it to your subscribers: > > something like: > > project/lib/subscribers.py: I don't have that file or that directory. Should I? I'm afraid I didn't understand the rest of your exam

Re: Webhelpers html tag examples

2011-08-30 Thread cd34
Mike Bayer (of Mako and SQLAlchemy) posted this: http://techspot.zzzeek.org/2008/07/01/better-form-generation-with-mako-and-pylons/ While it discusses Pylons, it does address one possible method without using a form library (or, using Mako as a form library). The method isn't limited to Mako, you

Re: Webhelpers html tag examples

2011-08-30 Thread Ben Sizer
On Aug 30, 2:42 pm, Benjamin Sims wrote: > If you are looking for a complete form library, there are a few that fit > nicely into Pyramid. I've had success with and would recommend deform: > > https://docs.pylonsproject.org/projects/deform/dev/ Hi Ben, Yeah, deform does look pretty good, and I w

Re: Webhelpers html tag examples

2011-08-30 Thread Benjamin Sims
If you are looking for a complete form library, there are a few that fit nicely into Pyramid. I've had success with and would recommend deform: https://docs.pylonsproject.org/projects/deform/dev/ The demo site provides nice examples of its capabilities: http://deformdemo.repoze.org/ and there i

Webhelpers html tag examples

2011-08-30 Thread Ben Sizer
I'm putting together a form, and looking for ways to do it, and although I'm used to just writing the HTML by hand, I'll happily use something to generate it also. The webhelpers.html.tag stuff looks like it would work: but are there any examples of people using this with Pyramid? The docs contain