chiangf wrote: > I'm still in the Java mindset so I haven't figured out Python packages > yet. My controllers.py file is a little big for my tastes and it takes > a while to scroll around. So I want to split it up. > > To make it simpler to describe, let's say that I want to split it into > three chunks, the main controller part, constants, and validation. > However, the validation requires the constants, etc. I guess it would > be safe to say that almost all the chunks depend on each other. > > I read that you can just split it up and import them from controllers > but when I tried that it complained that FancyValidator (which is > needed in validation) is not defined. It just got more and more > complicated. >
You have the right idea with splitting up your controller and importing the necessary parts between files. You might want to take a look at the Python module handling docs, which you can find here: http://docs.python.org/tut/node8.html You can also probably find some TG projects that handle controller imports, and if all else fails just ask on the list and we can help you get it sorted out. -Adam --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

