On 27 juin, 09:47, Reza Muhammad <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I just started learning about python and django. For the past months I
> was working on a project using a PHP framework (I guess, the name
> would not be important right now :).  For my initial experiment, I
> would like to port my last project that I used with PHP to django.
> The project contains 10 tables, and most of them have relationships
> between one another.  So, I think this is considered as one
> application.
>
> Anyway, I am used to having separate files to facilitate different
> controllers (I think it's called views in django).

Yeps.

> On the other hand,
> django uses one views.py for one application.

That's the default convention, but you can organize your views as you
like. And you can even follow the convention while having you
functions in different modules - you just have to turn your views
module into a package that exposes the functions in it's submodules.
You'll find relevant doc here:

http://docs.python.org/tut/node8.html
and more specifically here:
http://docs.python.org/tut/node8.html#SECTION008400000000000000000

>  Is there anyway I can
> have a views/parts.py or parts_views.py that interacts with part
> model,

It goes the same wrt/ models.


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to