Django: Naming URL Patterns

Alright, this is just to those who use Django to develop web-applications in Python. The rest can just stop reading.

Stop. Reading.

Considering you’re still reading this, let me just ask a simple Python question. What will the following line output?

print apply(lambda a: a*a, range(10))

Alright, if your answer was anything else than

Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: <lambda>() takes exactly 1 argument (10 given)

you’d better stop reading this post, you clearly don’t know anything about Python.

Ok, I assume only realy Djangoers are still reading now.

Django is getting Named URL Patterns! Which means you don’t have to construct URLs yourself anymore (/bla/topic/{{ topic.id }} stuff), but they can be constructed from the information you have in your urls.py. Haha!