Re: When should I do my imports, in views.py?

2008-10-27 Thread Horst Gutmann
According to the Python Coding Guidelines you should always put the imports at the top of a file simply because it makes the file more readable. Performance-wise there are AFAIK some small speed-ramifications (negative ones) when putting imports into a function instead of having them at the module

Re: When should I do my imports, in views.py?

2008-10-27 Thread Steve Holden
7timesTom wrote: > I have a large number of view functions which require various python, > django and other import statements. > > My question is: is it ok to put ALL my import statements at the top of > views.py and then not have to worry about which view fuction uses > what. Or must I put my imp

When should I do my imports, in views.py?

2008-10-27 Thread 7timesTom
I have a large number of view functions which require various python, django and other import statements. My question is: is it ok to put ALL my import statements at the top of views.py and then not have to worry about which view fuction uses what. Or must I put my imports within the view fuction