On Jun 27, 10:47 am, Reza Muhammad <[EMAIL PROTECTED]> wrote:
> Anyway, I am used to having separate files to facilitate different
> controllers (I think it's called views in django).  On the other hand,
> django uses one views.py for one application.  Is there anyway I can
> have a views/parts.py or parts_views.py that interacts with part
> model, or something like that? Because  currently, I have about 60
> functions in my PHP's controllers that I want to port to django.  So,
> that will mean 60 functions in views.py right? Is this the right way
> to do it?  Or can I separate those functions into multiple views?

You don't need to have them all in one file. I use two for example,
one called views.py and the other called admin_views.py. So one is for
the publicly accessible views, and the other is for the admin
application customization views. You can have as many as you want, and
in the structure that you find more comfortable. You simply call them
differently in your urls conf file.

Also, you can have a separate directory for your views and so
on...just remember the python module part. Go over the documentation
for views again, i believe this is covered well.
--~--~---------~--~----~------------~-------~--~----~
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