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 trialJamie Sims
4,317 PointsHelp, i can't seem to get the import function to high light red when I use "." to specify current directory.
Hi there,
I can't seem to correctly import the views module. Can anyone help?
Cheers,
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.hello_world),
]
1 Answer
John Lack-Wilson
8,181 PointsAlthough the error is stating that you have not imported views, your code for importing is correct. I believe the actual problem is related to line 6 with url. Check the views file again to see if you are using it correctly.