Deform/Colander adding/removing fields with a deferred callback?

2011-04-01 Thread oO
fore the schema is returned to the view. Is there another way to approach the problem? oO -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe f

Re: How would one use MongoEngine with Pyramid?

2011-03-25 Thread oO
so the connection doesn't get created/closed for every request. I also find that the DB connection is something that should belong to the resources, not the request. (and you can always get it from the request using request.root.db oO -- You received this message because you are subscribed t

Deform/Colander Schema declaration with built-in validator

2011-03-24 Thread oO
Is it possible to declare a Mapping Schema with a built-in validator attached to it? I'm creating a form has uses Geo coordinates ( lat, lon ) and I'm looking for the best way to implement these. Right now, I have the following: class GeoCoordSchema(colander.MappingSchema): lat = coland

Re: An overview over form libraries

2011-03-23 Thread oO
ation and validation. I haven't use any of the other ones in the list. oO -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, s

Deform/Colander and DB validation/inserting

2011-03-20 Thread oO
lly inserting the record in the database. Is there a way to have a single top-level validation callback? maybe a validator on the entire schema? unless there is a way to raise an exception that would allow me to use that part of the code that re- renders the form with all of the existing user inputs a

Re: Pyramid modify query parameter of current url

2011-03-20 Thread oO
guess the pagination code shouldn't really have to know that I'm using traversal or route matching. oO On Mar 18, 3:05 pm, Michael Merickel wrote: > The query parameter to resource url expects a list of 2-tuples, > coincidentally the same as what is returned by request.GET.

Pyramid modify query parameter of current url

2011-03-18 Thread oO
as a dictionary that would be compatible with what resource_url() expects to rebuild the modified url. Any ideas? oO -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com.

Re: Custom AuthPolicy remember/forget not called

2011-03-08 Thread oO
Any ideas on that? I've re-read my code, and the documentation, but I didn't see anything obvious. Should I ask pylons-devel instead? I'm not sure if writing your own AuthenticationPolicy counts as pylons- discuss or -devel material ;-) oO On Mar 4, 11:10 am, oO wrote: > I

Custom AuthPolicy remember/forget not called

2011-03-04 Thread oO
I seem to be having problems implementing a custom Authentication Policy class. I've created the following class, and the only purpose is to remember and forget users using the Session, rather than creating your own cookie as with the AuthTktAuthenticationPolicy class. I'm using pyramid_beaker as t

Re: Authorization inside a Template/View

2011-03-03 Thread oO
('permission_name', resource, request) On Mar 3, 2:48 pm, Chris McDonough wrote: > On Thu, 2011-03-03 at 14:46 -0800, oO wrote: > > The conceptual problems that I have is the following: > > > Let's say that I have an Admin resource, somewhere in my resource &

Authorization inside a Template/View

2011-03-03 Thread oO
; so I can include the admin menu item or not? Ideally I'm looking for some sort of GET_URL_PERMISSION( "/admin", "view") function that I could call from the template and pass a url and permission request that would return a boolean. Disclaimer: I'm using traversa

Re: email?

2011-03-01 Thread oO
is there a framework adapter for pyramid in TurboMail yet? or can you just use the pylons one? One of the nice things about pyramid_mailer is the fact that you stick your settings in the ini file, and you have a simple Mailer.from_settings(settings) call. oO On Mar 1, 4:36 pm, Alice Bevan

request.resource_path()

2011-02-26 Thread oO
Is there a way to construct relative urls using the request object? I'm working within general purpose template functions, so I pretty much can only rely on the request object, and I would like to create urls in the form /foo/bar and not http://domain/foo/bar which is the output of the request.res