Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Customizing Django Templates Building Custom Tags Complex Template Tags

rajan lagah
rajan lagah
2,539 Points

How cources:detail work in url?

please explain how anchor tag work

1 Answer

Nikolay Nogin
Nikolay Nogin
22,154 Points

I don't know accurately, but i think it's connected with url(s).py:

  • The main url.py(in learning_site directory) has namespace='courses' in urlpatterns and url to the view.
  • The inner app's url.py(in courses directory) has name, assigned as 'detail'. (name='detail') and url to the view.

I think django clever enough to tie them with. So you can type courses:detail and it will find the way. The same with courses:list and courses:step.