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 What a View! First URL

I"m getting an error here, and I don't see the mistake.

I need to import the views from current directory I did

from . import views

from django.conf.urls import url

from . import views

urlpatterns = [
    url(r'^$', views.hello_world),

3 Answers

If you are on the first task, you need to remove the first and only element in urlpatterns. I know you're excited to start appending elements to the list, but that's for the second task.

If you are on the second task, however, I believe you need to put in the correct URL. :smile:

I hope this helps. ~alex


Ryan S
Ryan S
27,276 Points

Hi Jose,

The issue is that the challenge asks you to point to a view named "index" in your url pattern, not "hello_world".

Good luck.

Oops, I was paying too much attention on the second-last line of code (the element inside of the urlpatterns variable) and I didn't notice that XP

Thanks for the catch. :smile:


Thank you guys!