On 12/1/06, Michael Patrick O'Keefe <[EMAIL PROTECTED]> wrote:
> SUMMARY OF PROPOSAL:
> For Django application modules, I find it easier to have the URL
> information for a view coupled with the function that is going to
> display that view.

Ehh... the word "coupling" scares me ;)

> Why? This further supports the DRY (Don't Repeat
> Yourself) principle in my mind because you don't have to type both
> the view function definition as well as the "mapping" for that view
> to the relevant URL regular expression. My mind also works better
> such that it makes sense to keep view and URL mappings in one logical
> place as opposed to jumping back and forth between two files.

Personally, I like the idea of making it possible to have as much of
the code as possible in one file, since it makes simple apps even
simpler.

But... of the proposals to enable this, I think the ROOT_VIEW one is
probably the best so far in terms of additional flexibility beyond
just the "all in one file" capability. I'm also not sure about
decorator-style URL mapping -- one of the huge strengths of Django,
for the use cases I work with, is being able to re-use the same app in
multiple different sites with different URL structures; coupling the
URL mapping to the view with a function decorator basically makes that
impossible.


-- 
"May the forces of evil become confused on the way to your house."
  -- George Carlin

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to