On Feb 7, 2:09 am, iain duncan <[EMAIL PROTECTED]> wrote:
> Apologies for the cross posting, I'm not sure if this should be on the
> SA list or here.
>
> I'm working on an admin interface and trying to make it generic when
> that will do, a la django, but more easily customizable. A couple of
> things I could not yet find in the SA docs, can anyone point me to the
> right place or if they know pipe up?
>
> - how would one ask a mapper object for its underlying table(s)?
>
> - I found out that table_name._orig_cols gives me the column names and
> types, but as it's in a dict, it's not ordered
>
> - the repr of a table name gives the Table object, which has the columns
> listed in order. Before I do something stupid like slice up this repr
> with reg exes, is there an easy way to access the columns and their
> attributes in the order they are declared in the Table call?

I believe Klass.c.keys() maintains the column order.

>
> Lastly, is anyone working on this kind of stuff with pointers or code
> that I should look at? I'm sure I'm going to do some silly stuff on my
> own. ;)

There are a couple places where people are trying to do similar CRUDdy
stuff in different ways (using sqlalchemy). I imagine any of them
would appreciate any contributions you had if you have code or
feedback. (As someone working on fastdata2, I know I would).

http://trac.turbogears.org/browser/projects/tgcrud
http://trac.turbogears.org/browser/projects/FastData2 (not far enough
along to answer most your questions)
http://www.thesamet.com/blog/wp-content/uploads/2006/12/TGQuickData-0.1.zip


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to