Skip to content

Commit 4e76dd4

Browse files
author
Resolver Developers
committed
Added commenting and uncommenting of the home url to prevent errors early in the process. by: Glenn
1 parent 6aaf4d6 commit 4e76dd4

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

content/django.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ should replace them with your project name or app name, if necessary.
159159
admin.autodiscover()
160160

161161
urlpatterns = patterns('',
162-
# Examples:
163-
url(r'^$', 'mysite.myapp.views.home', name='home'),
164-
# url(r'^foo/', include('mysite.foo.urls')),
162+
# This is going to be our home view.
163+
# We'll uncomment it later
164+
# url(r'^$', 'mysite.myapp.views.home', name='home'),
165165

166166
# Uncomment the admin/doc line below to enable admin documentation:
167167
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
@@ -249,6 +249,15 @@ Copy the code below into it and save the file.
249249
def home(request):
250250
return render(request, 'home.html', {'right_now':datetime.utcnow()})
251251

252+
253+
Now that we've defined the view, we can uncomment this line in urls.py
254+
255+
256+
.. sourcecode:: python
257+
258+
# url(r'^$', 'mysite.myapp.views.home', name='home'),
259+
260+
252261
The last step is reloading your web app so that the changes are noticed by the
253262
web server. Go and do that now, back in the **Web** tab with the big
254263
**Reload Web App** button.

0 commit comments

Comments
 (0)