formencode ForEach doesn't obey not_empty=True

2009-01-26 Thread eleith
for my schema, i want to handle delete?id=100 delete?id=100id=101id=102 and throw an error for delete? - my validators look like this: id = ForEach(Int(), not_empty=True, convert_to_list=True) however, this

Re: State of Auth with Pylons

2009-01-26 Thread TJ Ninneman
I'd like to see the Pylons quickstart template offer an authentication/authorization solution as an option, in the same way that it offers a DB/ORM solution (SQLAlchemy) so the user can get started quickly. This may not be a bad idea at this point. Would you like to make a Trac ticket

Re: formencode ForEach doesn't obey not_empty=True

2009-01-26 Thread jerry
Hi, Have you tried -- not_tested ForEach(Int(not_empty=True), ...) /not_tested Jerry On Jan 26, 5:33 am, eleith ele...@gmail.com wrote: for my schema, i want to handle delete?id=100 delete?id=100id=101id=102 and throw an error for delete?

Re: Is Django more popular than Pylons?

2009-01-26 Thread Mario Ruggier
From what you all say I think we do agree that it is not just a superficial question of style. It goes beyond that, and there is a price to pay -- and that the price is generally justifiable. And, as Micheal eloquently states, given the looming horizon, the line taken by pylons promises

Re: Is Django more popular than Pylons?

2009-01-26 Thread Mike Orr
On Mon, Jan 26, 2009 at 8:10 AM, Mario Ruggier ma...@ruggier.org wrote: From what you all say I think we do agree that it is not just a superficial question of style. There are two aspects to the style. One is the philosophy of WSGI to the core, and thus the choice of Paste as the first

Re: formencode ForEach doesn't obey not_empty=True

2009-01-26 Thread Wayne Witzel
On Jan 26, 5:33 am, eleith ele...@gmail.com wrote: for my schema, i want to handle delete?id=100 delete?id=100id=101id=102 and throw an error for delete? - my validators look like this: id =

Re: formencode ForEach doesn't obey not_empty=True

2009-01-26 Thread Wayne Witzel
On Jan 26, 11:40 am, Wayne Witzel wwitz...@gmail.com wrote: On Jan 26, 5:33 am, eleith ele...@gmail.com wrote: for my schema, i want to handle delete?id=100 delete?id=100id=101id=102 and throw an error for delete?

Re: query inside Model?

2009-01-26 Thread Jonathan Vanasco
Yes and no. I don't agree with the default Pylons session approach -- where you have 1 global db session. I tend to use a mixture of 2 things to handle sessions in the Model: 1- A Factory class manages a session pool and which type is active ( read, write, log, etc). I call out to the factory

Re: formencode ForEach doesn't obey not_empty=True

2009-01-26 Thread eleith
yup, that does not work. the Int validator will fail, but then the ForEach will continue on with success --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to

Re: formencode ForEach doesn't obey not_empty=True

2009-01-26 Thread eleith
thanks wayne. this is an acceptable workaround, i've been using a chained validator that does something similar, but it probably makes sense to just use something like yours. i implemented my workaround as a chained validator because if this is indeed a bug, when it gets fixed, i can just take

Re: formencode ForEach doesn't obey not_empty=True

2009-01-26 Thread eleith
jerry, yup, that does not work. the Int validator will fail, but then the ForEach will continue on with success --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email

[ANN] Rum 0.2 has been released

2009-01-26 Thread Alberto Valverde
Hi, I'm proud to announce that we've just made the first public release of Rum and its SQLAlchemy plugin. Rum is an extensible WSGI web application to provide a RESTful interface for your app's model objects. You can think of it as an alternative to Django's admin for the non-django world.

Re: State of Auth with Pylons

2009-01-26 Thread TJ Ninneman
Have you managed to deal with the problem of login handlers and error messages, that is what happens if a user tries to log in and for whatever reason, fails? I'm currently using repoze.who, and haven't managed to overcome this major point, even though I've discussed it at length with

Re: State of Auth with Pylons

2009-01-26 Thread TJ Ninneman
On Jan 26, 2009, at 1:18 PM, TJ Ninneman wrote: Have you managed to deal with the problem of login handlers and error messages, that is what happens if a user tries to log in and for whatever reason, fails? I'm currently using repoze.who, and haven't managed to overcome this major

Re: formencode ForEach doesn't obey not_empty=True

2009-01-26 Thread Wyatt Baldwin
On Jan 26, 2:33 am, eleith ele...@gmail.com wrote: for my schema, i want to handle delete?id=100 delete?id=100id=101id=102 and throw an error for delete? - my validators look like this: id =

Re: State of Auth with Pylons

2009-01-26 Thread Gustavo Narea
Just for the record, there's already an SQLAlchemy/Elixir-based repoze.who authenticator: http://code.gustavonarea.net/repoze.who.plugins.sa/ So you don't have to write it yourself. Cheers. PS: Regarding your problem, I think RedirectingFormPlugin is a good solution. But anyway, I think this

Re: Is Django more popular than Pylons?

2009-01-26 Thread Noah Gift
I of course agree with Jorge's argument on the advantages of a non- monolithic framework And yes of course that having different components to install will naturally give rise to numerous installation problems. But, it remains that that there were several strange setuptools-related problems

Re: State of Auth with Pylons

2009-01-26 Thread TJ Ninneman
On Jan 26, 2009, at 1:33 PM, Gustavo Narea wrote: Just for the record, there's already an SQLAlchemy/Elixir-based repoze.who authenticator: http://code.gustavonarea.net/repoze.who.plugins.sa/ So you don't have to write it yourself. Cheers. PS: Regarding your problem, I think

Re: formencode ForEach doesn't obey not_empty=True

2009-01-26 Thread Wyatt Baldwin
On Jan 26, 11:30 am, Wyatt Baldwin wyatt.lee.bald...@gmail.com wrote: On Jan 26, 2:33 am, eleith ele...@gmail.com wrote: for my schema, i want to handle delete?id=100 delete?id=100id=101id=102 and throw an error for delete?

Re: formencode ForEach doesn't obey not_empty=True

2009-01-26 Thread Wayne Witzel
On Jan 26, 2:30 pm, Wyatt Baldwin wyatt.lee.bald...@gmail.com wrote: On Jan 26, 2:33 am, eleith ele...@gmail.com wrote: for my schema, i want to handle delete?id=100 delete?id=100id=101id=102 and throw an error for delete?

FormEncode and RequireIfPresent

2009-01-26 Thread grassoalvaro
Hi, here's source: import formencode from formencode.validators import * from webhelpers.util import UnicodeMultiDict class Form(formencode.Schema): allow_extra_fields = True create = Bool() email = Email(if_missing=None) test = String(if_missing=None) chained_validators =

Looking for Pylons speakers

2009-01-26 Thread Joshua D. Drake
Hello, I run PostgreSQL Conference (long announcement below). We are looking for some people to speak on Pylons + PostgreSQL at East 09 in Philly. Anybody interested should submit a talk (or better yet Tutorial). Begin long infomercial: PostgreSQL Conference, U.S., East 09 will be held in

Re: formencode ForEach doesn't obey not_empty=True

2009-01-26 Thread Junya Hayashi
Hi eleith, How about following using validator instead? class AtLeastOne(ForEach): validator = Int def _to_python(self, value, state=None): value = super(AtLeastOne, self)._to_python(value, state) if len(value) 1: raise Invalid(at least one item must be

Re: Looking for Pylons speakers

2009-01-26 Thread Jonathan Vanasco
Josh - Do you know when the deadline for submissions is? I'm about to release a Pylons/PG open source project. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email

FormEncode and International Languages

2009-01-26 Thread Jonathan Vanasco
How are people dealing with FormEncode and International Languages? Our project is dealing with a lot of French writers typing things like é , which fails many formencode tests. This is more of an 'approach' issue: - how are you handling internationlization in Pylons from a business standpoint

Re: FormEncode and International Languages

2009-01-26 Thread Gustavo Narea
On Monday January 26, 2009 23:20:37 Jonathan Vanasco wrote: How are people dealing with FormEncode and International Languages? You write to an international mailing list talking about international languages. Then you assume English/Spanish/* means national language to us? Tell us where

Re: Looking for Pylons speakers

2009-01-26 Thread Joshua D. Drake
On Mon, 2009-01-26 at 14:13 -0800, Jonathan Vanasco wrote: Josh - Do you know when the deadline for submissions is? You got at least a month. I'm about to release a Pylons/PG open source project. -- PostgreSQL - XMPP: jdr...@jabber.postgresql.org Consulting, Development, Support,

Re: FormEncode and International Languages

2009-01-26 Thread Jonathan Vanasco
fair on some points, i disagree with others. i'm in the US. the formencode author seems to be as well. 'internationalization' on most things seems to be limited to swapping in text. many of the checks, such as PlainText allow for only a subset of ascii. anything else trips an error. short