On 6 avr, 19:13, Mazery Smith <mazerysm...@gmail.com> wrote:
> Hello,
> I have a project with a few application folders in it. One of those
> applications houses all the views for the website. I've built some
> utility classes placed in an entirely different application folder
> (utility_app helper module) that assist in processing requests in each
> view. Is this the best place for such a utility class -- meaning
> housing it in another applicaiton all together and importing it (from
> utility_app.helpers import *) in my views?
>
> Maybe there's a more logical place for it.

Well, if all your views are in a same app and these helper classes are
only used by your app's views and are tightly coupled, then they
should IMHO leave in the same app.

Now if they aren't tightly coupled (=> could be used in another app),
it of course make sense to extract them.

It's just the same old hi-cohesion / low-coupling stuff FWIW.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to