This site is an archive; learn more about 8 years of OpenHatch.

[OH-Dev] helpers vs. controllers

Asheesh Laroia asheesh at asheesh.org
Thu Mar 21 01:00:55 UTC 2013


Howdy all,

Some of you may have noticed that we sometimes have files called 
"helpers.py" or "controllers.py".

Some others of you might have been trying to implement, or refactor, a 
view.

Here's what I am thinking:

Where these helpers/controllers exist, and are bits of code (e.g., 
functions/classes) that make a view possible, I think we should put them 
in:

mysite/app_name/view_helpers.py

(e.g. mysite/search/view_helpers.py )

That will mean moving a bunch of code around, but I think it will be for 
the good. I hope Nathan Yergler might be able to say if he thinks it's a 
good idea or not!

(If it is a good idea, we should write it down in a style guide, and then 
do a massive code move. Then I can stop having to make faces when I 
explain why our Django project has a "controllers.py" file.)

-- Asheesh.


More information about the Devel mailing list