On Thu, Jul 16, 2009 at 3:16 PM, Jumpfroggy<rocketmonk...@gmail.com> wrote:
> You could put all these functions into the
> models.py file if you wanted, you'd just end up with huge models.py
> objects, and you might also run into cases where there is not an
> obvious place to put a bit of business logic.  Not every business
> logic function corresponds exactly to one model.

totally agree.

in my case, sometimes i just add a small utils.py with some of these;
but still haven't feel the need for a real business.py layer, since
until now for each 'user leve' concept there's usually a DB table,
therefore the obvious place for almost every method is right in that
model.

granted, these are mostly office automation intranet webapps, so the
user is already familiar with the main concepts that can be modeled in
the DB.  for more 'public' apps, the desired user-level concepts could
be alot more detached from the DB, and a thick business.py layer (with
lots of tests!) would be definitely the best answer.

-- 
Javier

--~--~---------~--~----~------------~-------~--~----~
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