On Aug 30, 3:08 am, Ilya Semenov <[EMAIL PROTECTED]> wrote:
> Second, I think the use of generic views is over-estimated.

I tend to agree a bit here.  I like having all my URLs in one file and
all my views in another.  Using generic views usually clutters the
urls file too much for me.  Generic views usually don't save enough
code to be worth it in my experience, it just moves the code to a
different place.  Also, if I ever wanted to change the view up to do
more custom things, I would have to undue the generic view setup and
create a regular view anyway, so why not just do that in the first
place.

> > 2. One of the best things (again, in my opinion) of urls.py is that it
> > shows whole user interface of an app in one place. You loose this
> > feature with decorators scattered all over views.

Yes, I think this is a very nice thing about having a file dedicated
to url conf.  It give you a nice summary of what the application does
and how it's organized.  I would not like having to scan through all
my views to figure out the URL structure.

> While I see the rationale in your words, that position is very
> arguable.
>
> Encapsulation is one of the greatest programming principles. From the
> architectural point of view, the app-level urls.py shouldn't bother
> what members area urls are there in members module, since it can
> safely delegate the responsibility to manage the list of members urls
> and just pull the data when needed.

Isn't this what include() is for:
(r'^members/', include('myapp.members'))

All the members URLs can be encapsulated in the members module.

Gary


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