there has been a number of apps announced that do html forms from SA schema - look up the list. afaik Column() takes an 'info=...' dict with whatever stuff u put in it. Same goes for Table()
> > I have been trying to figure out a way to easily create HTML forms > and some other stuff from my schema without repeating myself all > over. I have looked through the doc and to an extent the list but > havent found anything. > > Ideally I would be able to do something like > Column("whatever", String(128), metadata= { 'visible':True} ) > > then in my form generating code do something like > > if obj.c.whatever.metadata['visible']: > print obj.whatever > > Basically, what I am looking for is the ability to associate extra > attributes to these columns in my code without having to redefine > them. It would be awesome to do something like > > ${formfor(obj)} > > in my templates instead of hardcoding it then worrying about the > form changing or a column growing later. I apologize if this sounds > stupid or like a bad idea. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---