Sometimes I put it in some 'utils.py' in the app directory, and sometimes in 'views.py' itself, with leading underscores, whichever I feel is more appropriate.
I guess this would be more of the developer's choice. Any better suggestions? Thanks, Subhranath Chunder. On Mon, Sep 27, 2010 at 12:43 PM, Antoni Aloy <antoni.a...@gmail.com> wrote: > 2010/9/27 MrMuffin <thomas.weh...@gmail.com>: > > Where do you put your business logic in django? In my project I`ve put > > it into the models.py, but that file soon become huge and hard to > > maintain. Of course I can just stuff it into whatever file I like, but > > I`d like to have some standard way of doing this. There seems to be > > something missing in django when it comes to business logic. It`s all > > model, views and templates and that`s all great for small projects, > > but both the models.py and views.py very soon gets huge and how do you > > re-organize your project when that happens? Splitting views and models > > into seperate files is only a partial solution and that requires some > > hackish code in __init__.py to make syncdb etc work. And then there`s > > urls.py. > > > > Should there be a better and standardized way to organize huge > > projects in django? > > > > Thanks for your time. > > > > Django allows you to split your project in applications, and Django > applications are quite linked to models. But you can create your own > libraries, this is Python. As an example, we create applications to > connect to different web services and we use Django in the project. > Each web service mapping is in its own Python packages. The Django > urls and views just uses that package. > > Hope it helps! > > -- > Antoni Aloy López > Blog: http://trespams.com > Site: http://apsl.net > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.