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 Django Basics Final Details Step Detail View

Same view names

Hi! I started working on my own project(creating a blog) and my URLconf contains this:

url(r'^$', views.blog, name='blog'),
url(r'^(?P<page>[0-9]+)$', views.blog, name='blog'),

it works, but i don't no whether it is a right solution, please help

1 Answer

Haydar Al-Rikabi
Haydar Al-Rikabi
5,971 Points

Nothing wrong with your code. There is only one caveat, though. The r'^$' format causes an error in Django 2.0. You should replace it with r''.