views:

44

answers:

1

Explain me please what this line doing:

<a href="{% url video.media.views.channel_browse slug=slug%}">Archie Channel</a>

Actually this:

{% url video.media.views.channel_browse slug=slug%}

I know that it give me URL, but what from, or how it is making this URL?

does this url depend from context? if it depend from context so which context - this where is this line or which gives channel_browse function?

+4  A: 

The url template tag uses the reverse() function to look up which url dispatch line has a name=channel_browse, including if it needs to fill in slug=whatever because that particular url dispatch line has a (?P<slug>.*) argument in it that needs to be filled in order to recreate the actual url.

Here's a complete explanation of the whole request system.

eruciform