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

[OH-Dev] helpers vs. controllers

Nathan Yergler nathan at yergler.net
Thu Mar 21 01:39:42 UTC 2013


This is an excellent idea. Explicit is better than implicit.

NRY


Asheesh Laroia <asheesh at asheesh.org> writes:

> 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.
> _______________________________________________
> Devel mailing list
> Devel at lists.openhatch.org
> http://lists.openhatch.org/mailman/listinfo/devel


More information about the Devel mailing list