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 trialChristopher Gomez
Courses Plus Student 13,800 PointsMy Hello World page is not working?
I keep getting this
Workspace Unavailable This is a preview link for a Treehouse Workspace that is not currently active.
If you are the workspace owner, you can launch it again via the Treehouse site.
I followed the video tutorial exactly not sure what to do
18 Answers
Chris Freeman
Treehouse Moderator 68,441 PointsLooks like you're missing a comma (,)
Chris Freeman
Treehouse Moderator 68,441 PointsUsing the "eye" icon to preview the workspace only works if there is an active process running. Did you remember to start you webserver using:
treehouse:~/workspace/learning_site$ python manage.py runserver 0.0.0.0:8000
Also, be sure that the preview port number matches the port number in your launch command. "8000" in this case.
Post back if you need more help. Good luck!
Christopher Gomez
Courses Plus Student 13,800 PointsChris Freeman now I'm getting a syntax error here is my code
from django.conf.urls import url
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^$' views.hello_world),
]
Chris Freeman
Treehouse Moderator 68,441 PointsBe sure to wrapped included urls with include()
:
url(r'^admin/', include(admin.site.urls)),
and to import include
from django.conf.urls
Christopher Gomez
Courses Plus Student 13,800 PointsChris Freeman That's not working
Chris Freeman
Treehouse Moderator 68,441 PointsOK. At this point I need more code. Can you paste your current urls.py file and the complete stacktrace included with the error message or syntax error?
Christopher Gomez
Courses Plus Student 13,800 Pointsfrom django.conf.urls import url
from django.conf.urls import include
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^admin/', admin.site.urls)),
url(r'^$' views.hello_world),
]
[MOD: added ```python formatting -cf]
Christopher Gomez
Courses Plus Student 13,800 PointsFile "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/treehouse/workspace/learning_site/learning_site/urls.py", line 23
url(r'^admin/', admin.site.urls)),
^
SyntaxError: invalid syntax
Christopher Gomez
Courses Plus Student 13,800 Pointsfrom django.conf.urls import url , include from django.contrib import admin
from . import views
urlpatterns = [ url(r'^admin/', admin.site.urls)), url(r'^$' views.hello_world), ]
Christopher Gomez
Courses Plus Student 13,800 PointsFile "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/treehouse/workspace/learning_site/learning_site/urls.py", line 22
url(r'^admin/', admin.site.urls)),
^
SyntaxError: invalid syntax
Chris Freeman
Treehouse Moderator 68,441 PointsBe sure to wrapped included urls with include()
:
url(r'^admin/', include(admin.site.urls)),
and to import include
from django.conf.urls
Christopher Gomez
Courses Plus Student 13,800 PointsChris Freeman I put it down two way's I tried it and the arrow is pointing at the wrong letter it's pointing at the third quotation
Christopher Gomez
Courses Plus Student 13,800 Pointswhen I erase the third quotation it points at the views s
Chris Freeman
Treehouse Moderator 68,441 PointsI don't see you following my suggestion.
# you still have
url(r'^admin/', admin.site.urls),
# I am suggesting
url(r'^admin/', include(admin.site.urls)),
Christopher Gomez
Courses Plus Student 13,800 Pointsfrom django.conf.urls import url, include
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^admin/', include (admin.site.urls)),
url(r'^$' views.hello_world),
]
[MOD: added ``` python formatting -cf]
Christopher Gomez
Courses Plus Student 13,800 Pointsfrom django.conf.urls import url
from django.conf.urls import include
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^admin/', include (admin.site.urls)),
url(r'^$' views.hello_world),
]
Christopher Gomez
Courses Plus Student 13,800 Pointsgives me syntax error on url(r'^$' views.hello_world), ^
Christopher Gomez
Courses Plus Student 13,800 Pointsits under views the arrow
Christopher Gomez
Courses Plus Student 13,800 Pointsyup it worked looks weird tho
url(r'^$', views.hello_world),
url(r'^$' views.hello_world),
Christopher Gomez
Courses Plus Student 13,800 Pointsthanks for your help
swaroop s
Python Web Development Techdegree Student 246 Pointsi am getting attribute error can anyone help me
Chris Freeman
Treehouse Moderator 68,441 PointsI suggest greeting a new forum post and including the full error stack trace you get. Tag me in the post if you wish with @chrisfreeman3
Christopher Gomez
Courses Plus Student 13,800 PointsChris Freeman you still on