Re: New to python pylons

2007-03-29 Thread Jose Galvez
I just use: metadata = create_engine() that seem simplest to me Jose __wyatt wrote: On Mar 28, 9:57 am, __wyatt [EMAIL PROTECTED] wrote: On Mar 28, 9:05 am, fintan [EMAIL PROTECTED] wrote: ... Personally I find the way pylons.database works a little bit less explicit than I would

Re: bug with select multiple field ?

2007-03-29 Thread laurent
Hi, Yay, that's it. I was doing a poor unicode conversion process: if request.method == 'POST': for k,v in request.POST.items(): request.POST[k] = v.decode('UTF-8') ...wich obviously eat duplicates entries The good function is described at

Using the database models in python scripts

2007-03-29 Thread Christoph Haas
Dear list... I (still) work on my task to do some database maintainance on the tables that I use in Pylons as models. So it sounds clever to reuse my configuration (.ini file) to connect to the database and get access to my sqlalchemy-mapped classes. The only solution I have so far looks

Returning XML with Myghty

2007-03-29 Thread Elias
Does anyone know if it's possible to return an xml template with myghty? I have this template ?xml version=1.0 encoding=ISO-8859-1? message envelope type%c.type%/type msg%c.mesg%/msg /envelope /message I'm calling this in my controller return

Re: Returning XML with Myghty

2007-03-29 Thread Deron Meranda
On 3/29/07, Elias [EMAIL PROTECTED] wrote: Does anyone know if it's possible to return an xml template with myghty? Yes, I do it all the time. In fact you can return just about any type of text-based file even if it's nothing like XML. [You can even output binary data, but that can get

Re: Returning XML with Myghty

2007-03-29 Thread Elias
Thanks a lot that totally makes sense. On Mar 29, 2:41 pm, Deron Meranda [EMAIL PROTECTED] wrote: On 3/29/07, Elias [EMAIL PROTECTED] wrote: Does anyone know if it's possible to return an xml template with myghty? Yes, I do it all the time. In fact you can return just about any type

AuthKit: how to use authorization in Myghty templates?

2007-03-29 Thread Chris Shenton
I'm using AuthKit with an SQLite DB and wrote a couple authorization checking classes like: class RoleIn(Permission): Does the user have a role in the supplied list of roles (logical OR). A user can have more than one role. def __init__(self, roles):

formencode.validators Set() doesn't allow empty (no) value

2007-03-29 Thread Chris Shenton
I'm trying to use formencode.validators Set() to check a multi-select form input. I cannot get it to allow me to select nothing, to return the empty list if nothing is selected: if I don't select something from the multi-select it complains Missing value. The docs say: C Set(...) ...

Re: AuthKit: how to use authorization in Myghty templates?

2007-03-29 Thread James Gardner
Hi Chris, You need the authorized() function which returns True or False rather than raising the exception. http://authkit.org/docs/module-authkit.pylons_adaptors.html Hope that helps, James something like: Chris Shenton wrote: I'm using AuthKit with an SQLite DB and wrote a couple

Re: formencode.validators Set() doesn't allow empty (no) value

2007-03-29 Thread Ian Bicking
Chris Shenton wrote: I'm trying to use formencode.validators Set() to check a multi-select form input. I cannot get it to allow me to select nothing, to return the empty list if nothing is selected: if I don't select something from the multi-select it complains Missing value. Generally

Re: Returning XML with Myghty

2007-03-29 Thread Pradeep Kishore Gowda
You might also have to set the header content-Type to xml. no? On 3/30/07, Elias [EMAIL PROTECTED] wrote: Thanks a lot that totally makes sense. On Mar 29, 2:41 pm, Deron Meranda [EMAIL PROTECTED] wrote: On 3/29/07, Elias [EMAIL PROTECTED] wrote: Does anyone know if it's possible