On Thu, Dec 3, 2009 at 1:30 PM, Todd Blanchard <tblanch...@mac.com> wrote: > Not sure what you mean? You mean something that looks through the code and > generates/expands urls for the view methods it finds?
not exactly, just something like i wrote before: a small function that takes a list of views and constructs the url mapping from a template. remember that the mapping is not code, it's a data structure. it's usually constructed explicitly line by line, but if you have a repeating pattern, you could factor it out. > I don't see the point of that exactly. The dynamic dispatch I'm doing does > the same thing and I prefer dynamic dispatch to code generation (I abhor > code generation). to each his poison. > I do have one additional little complaint about url handling and application > integration in general. > settings.py has a list of applications to include (INSTALLED_APPS). Fine. > But then, in urls.py I have to repeat myself by importing each > application's urls.py to add them. (r'^admin/', include(admin.urls)), remember that an app can do a lot more than provide views. autogenerating the mappings without being asked, would be definitely un-django-ist. (and quite likely non-pythonic too). OTOH, a shortcut to deal with repeating code would be really welcomed. again, just don't assume by default that it would have to be used, wait until it's called. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.