On 3/30/06, ToddG <[EMAIL PROTECTED]> wrote: > > I'm not sure if this was earlier missed or ignored by people [nobody > explictly ruled it out], I can't help but think Django's URL handling > will either drift towards re-implementing Routes: > http://routes.groovie.org/ or staying as it is. (note the lastest > version has a nice feature where you can pass in a function to do > pre-processing or whatever you want to args and such before creating a > Route or matching it).
I hate to say it, but Routes and most of the other schemes presented _do_ feel over-engineered. The current URL patterns system is fast and clean. The get_absolute_url() pattern is simple one, and yes it might break the "perfect Model seperation", but Django makes no qualms that it absolutely has to follow MFC or PCMEF or whatever else, but instead keeps in mind a good idea of what is "pragmatic". I would only suggest that renaming to perhaps get_canon_url() might be somewhat less confusing, in that it refers to a canonical URL rather than the preferred URL or every URL. (For example, my most common problem is the objects that have many different URLs in the same project based on semantic differences (ie, same object to admin, different object to user). In some cases get_absolute_url() points to the canonical URL that fits 85% of the cases and that view will do semantic redirects if necessary.) The ABSOLUTE_URL_OVERRIDES tool is a handy convenience to fix this seperation problem, and with it you can do all sorts of crazy things (thanks to the pythonic ability to pass around functions) like implement your own project-specific mini-routes or whatever (see my previous post on the subject). -- --Max Battcher-- http://www.worldmaker.net/ All progress is based upon a universal innate desire on the part of every organism to live beyond its income. --Samuel Butler --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---