@@ -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+
252261The last step is reloading your web app so that the changes are noticed by the
253262web server. Go and do that now, back in the **Web** tab with the big
254263**Reload Web App** button.
0 commit comments