> Why would make so great that the form was defined inside "index"? > Keep in mind that the form would have to be initialized on every > request instead of just once on "compile" time... If you need to > reuse fields for similar but different forms you can define common > fields in a WidgetsLists (or a plain ol' python list) and concatenate > them as needed.
I put my forms and my custom validators for them in a separate file so they can be imported from my controller file. This keeps the controllers short and clean with nothing but controller logic in them without a lot of clutter in the controller file, and puts all the related info for the forms, what they have, where they go, how they should be validated, in one file. If you put python executable code in that module, it will be executed on import in case of any special initialization needs, and your forms are in a convenient file for reuse in other projects. If I'm off base on that approach I'd like to know though! Iain --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

