summaryrefslogtreecommitdiff
path: root/docs/intro
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2013-06-28 17:32:57 +0100
committerAndrew Godwin <andrew@aeracode.org>2013-06-28 17:32:57 +0100
commit7a47ba6f6aeca36b8b092dbafd36abb342d34d4b (patch)
treee959922f7d4d08057225459e31697f410e26df26 /docs/intro
parente2d7e83256234251a81ad3388428f6579795a672 (diff)
parent48dd1e63bbb93479666208535a56f8c7c4aeab3a (diff)
Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts: django/db/backends/__init__.py django/db/models/fields/related.py tests/field_deconstruction/tests.py
Diffstat (limited to 'docs/intro')
-rw-r--r--docs/intro/reusable-apps.txt2
-rw-r--r--docs/intro/tutorial03.txt6
2 files changed, 4 insertions, 4 deletions
diff --git a/docs/intro/reusable-apps.txt b/docs/intro/reusable-apps.txt
index 4247b45238..879cda913a 100644
--- a/docs/intro/reusable-apps.txt
+++ b/docs/intro/reusable-apps.txt
@@ -67,7 +67,7 @@ After the previous tutorials, our project should look like this::
admin.py
models.py
static/
- polls
+ polls/
images/
background.gif
style.css
diff --git a/docs/intro/tutorial03.txt b/docs/intro/tutorial03.txt
index 6193ec45f7..91409848cf 100644
--- a/docs/intro/tutorial03.txt
+++ b/docs/intro/tutorial03.txt
@@ -339,14 +339,14 @@ Put the following code in that template:
Now let's update our ``index`` view in ``polls/views.py`` to use the template::
from django.http import HttpResponse
- from django.template import Context, loader
+ from django.template import RequestContext, loader
from polls.models import Poll
def index(request):
latest_poll_list = Poll.objects.order_by('-pub_date')[:5]
template = loader.get_template('polls/index.html')
- context = Context({
+ context = RequestContext(request, {
'latest_poll_list': latest_poll_list,
})
return HttpResponse(template.render(context))
@@ -377,7 +377,7 @@ rewritten::
return render(request, 'polls/index.html', context)
Note that once we've done this in all these views, we no longer need to import
-:mod:`~django.template.loader`, :class:`~django.template.Context` and
+:mod:`~django.template.loader`, :class:`~django.template.RequestContext` and
:class:`~django.http.HttpResponse` (you'll want to keep ``HttpResponse`` if you
still have the stub methods for ``detail``, ``results``, and ``vote``).