On Mon, Jan 11, 2010 at 7:07 PM, Chris wrote:
> FormEncode is great too, but also seems more complex. I often find
> myself wondering if I'm sub-classing the right thing or overriding the
> right methods in my custom validators. For example, when subclassing
> FormValidator, you override .valida
I've used wtforms a little and I think it is pretty great. Code base
is very clean and small and it also offers an immediate alternative to
@validate (and htmlfill). It does include html generation through
python class-based widgets (vs mako style widgets), but it still lends
ample flexibility wh
On Sun, Jan 10, 2010 at 3:27 PM, Chris wrote:
> One more alternative I forgot to mention about form handling:
> http://marcuscavanaugh.com/posts/pylons-django-forms/
A few people have mentioned using django.forms with Pylons and have
been pleased with it. There's another project WTForms which is
One more alternative I forgot to mention about form handling:
http://marcuscavanaugh.com/posts/pylons-django-forms/
On Jan 9, 1:18 am, Mike Burrows wrote:
> Thanks again Mike and everyone - this has been a very informative
> thread.
>
> > You'd have to ask on the FormEncode list for this. I a
Thanks again Mike and everyone - this has been a very informative
thread.
> You'd have to ask on the FormEncode list for this. I agree they'd be
> useful defaults.
Right - I will follow up with them,
> > [also: routes.Mapper(..., explicit=True); mapper.minimization=False -
> > where the framew
On Thu, Jan 7, 2010 at 6:12 AM, Mike Burrows (asplake)
wrote:
>
> While we're removing cruft, how often do people NOT need the first two
> members below? As previously mentioned I'd like to get that last one
> for free too.
>
> class BaseSchema(formencode.Schema):
> """
> Base form schema
>
A lot of things to comment on.
On Thu, Jan 7, 2010 at 10:35 PM, Chris wrote:
> I think a lot of folks have ended up writing their own @validate
> decorator to suit their needs (I have as well). I think there is a
> new one scheduled for 1.0.
It's been postponed till after 1.0 because otherwise
Thank you Chris for the pointer - it looks very good on a quick read
and I will study it properly.
On Jan 8, 7:35 am, Chris wrote:
> Mike,
> I think a lot of folks have ended up writing their own @validate
> decorator to suit their needs (I have as well). I think there is a
> new one scheduled
Mike,
I think a lot of folks have ended up writing their own @validate
decorator to suit their needs (I have as well). I think there is a
new one scheduled for 1.0.
I've moved away from htmlfill in favor of a technique Mike Bayer
blogged about here: http://techspot.zzzeek.org/?p=28
I use Bayer's
Make that
if v and not k.endswith('--repetitions'))
to remove empty values that for some reason get placed by htmlfill at
the top of the page and do weird things to page layout!
In case it wasn't obvious, the helper assumes a "from formencode
import variabledecode"
Mike
On
Right. And you could easily do additional validation without having
to wrap it up in a FancyValidator or whatever. I may go this way
myself.
On Jan 7, 3:11 pm, "Brian O'Connor" wrote:
> I meant to reply to this a little bit sooner. I had a solution that isn't
> amazingly elegant, but works, a
While we're removing cruft, how often do people NOT need the first two
members below? As previously mentioned I'd like to get that last one
for free too.
class BaseSchema(formencode.Schema):
"""
Base form schema
"""
allow_extra_fields = True
filter_extra_fields = True
pre
I meant to reply to this a little bit sooner. I had a solution that isn't
amazingly elegant, but works, and supports javascript addition of arbitrary
number of elements.
I do not use the @validate decorator.
This was originally designed for a newspaper website to add n number of
authors to an ar
Perhaps you're right - maybe @validate is more trouble than it is
worth. I have discovered that it doesn't handle repeating elements
properly: it negelects to flatten the errors dict. I worked around
this issue in a fill_render() helper which I use to render my forms:
def fill_render(template_n
On Wed, Dec 23, 2009 at 8:26 PM, Mike Orr wrote:
> On Wed, Dec 23, 2009 at 3:58 AM, Mike Burrows (asplake)
> wrote:
>> I'm far too new to Pylons to feel confident enough to contribute
>> documentation but I have linked to a few of my blog posts here. I
>> don't see too many others doing the same
On Wed, Dec 23, 2009 at 3:58 AM, Mike Burrows (asplake)
wrote:
> I'm far too new to Pylons to feel confident enough to contribute
> documentation but I have linked to a few of my blog posts here. I
> don't see too many others doing the same though, so I have to wonder
> about etiquette. Is this t
On Dec 23, 3:58 am, "Mike Burrows (asplake)"
wrote:
> I'm far too new to Pylons to feel confident enough to contribute
> documentation but I have linked to a few of my blog posts here. I
> don't see too many others doing the same though, so I have to wonder
> about etiquette. Is this to be encour
I'm far too new to Pylons to feel confident enough to contribute
documentation but I have linked to a few of my blog posts here. I
don't see too many others doing the same though, so I have to wonder
about etiquette. Is this to be encouraged? And who is blogging
regularly about Pylons? The most
I wish there was more resources for Pylons. I'm having the same
problem grasping the concepts of Pylons.
I also ran into the same problem at work...It's so irritating.
On Nov 6, 3:28 pm, "Mike Burrows (asplake)"
wrote:
> Hi Chris,
>
> Having got stuck with the basics of populating and validatin
Hi Chris,
Having got stuck with the basics of populating and validating the
form, I haven't got round to adding rows (dynamically or otherwise).
I think I've got my head sufficiently around the book example to
implement it now but I may yet decide to take the Javascript option.
Meanwhile, I just
Thanks, variable_encode did the trick.
Makes one wonder why this (and NestedVariables) can't be there by
default though - it would make for a much smaller gap between the
easy, documented examples and the real world! All it would take is an
enanced render method and perhaps a subclass of Schema.
On Nov 2, 8:32 pm, Ian Wilson wrote:
> Yeah as far as I know it does not work like that for the first case.
> You need to preprocess your defaults with
> formencode.variabledecode.variable_encode() to change the first case
> into the second case.
Thanks Ian, I'll look into that tomorrow.
> I'
Yeah as far as I know it does not work like that for the first case.
You need to preprocess your defaults with
formencode.variabledecode.variable_encode() to change the first case
into the second case.
I'm still working on a good repetitions example, are you using
javascript? You should look at
Hi,
htmlfill.render() doesn't seem to handle repeating elements as I
expect. I've boiled my code down to this example:
import formencode.htmlfill as htmlfill
template = ''
print htmlfill.render(template, defaults={'weightings':
[{'weight': 1.0}]})
print htmlfill.render(template,
24 matches
Mail list logo