On Monday 27 March 2006 13:23, Doug Van Horn wrote:
> When drawing a link to that view in HTML from another app I would
> 'hard code' that URL as, say, 'href="/foo/bar/99"'.
>
> Now say I come along and change my foo application, such that the
> URL is newly defined as, '^quux/\d+/bar/$'.  Everywhere I've hard
> coded that link will now be affected, requiring code changes and
> testing. I've tightly coupled my app urls.
>
> In response to this problem, my over-engineering brain tells me to
> create 'URL' objects, containing the regex defining the URL as well
> a way to 'construct' a 'real' URL.

we've now spent more time over-engineering than it would take to
sed "s/href=\"\/foo/href=\"\/quux/g" urls.py

I wonder what the half life is of 9 years of Java contamination?

wink-wink-nod-nod-ly yours,

Eric.

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

Reply via email to