summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorVarun Sharma <varunsharmalive@gmail.com>2016-01-09 17:10:08 +0530
committerTim Graham <timograham@gmail.com>2016-01-11 08:18:44 -0500
commit3d6474e1a50dbaf9684f7fb34bfccb77630f27be (patch)
tree69a388893b2d10c98686053769cea14e92742ec7 /docs/topics
parent0bc5cd628042bf0a44df60a93085a4f991a84dfb (diff)
Fixed #25385 -- Allowed importing views.generic.View from views.View.
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/class-based-views/intro.txt6
-rw-r--r--docs/topics/class-based-views/mixins.txt4
2 files changed, 5 insertions, 5 deletions
diff --git a/docs/topics/class-based-views/intro.txt b/docs/topics/class-based-views/intro.txt
index 5e3351e90c..45ffe5b635 100644
--- a/docs/topics/class-based-views/intro.txt
+++ b/docs/topics/class-based-views/intro.txt
@@ -71,7 +71,7 @@ something like::
In a class-based view, this would become::
from django.http import HttpResponse
- from django.views.generic import View
+ from django.views import View
class MyView(View):
def get(self, request):
@@ -113,7 +113,7 @@ and methods in the subclass. So that if your parent class had an attribute
``greeting`` like this::
from django.http import HttpResponse
- from django.views.generic import View
+ from django.views import View
class GreetingView(View):
greeting = "Good Day"
@@ -199,7 +199,7 @@ A similar class-based view might look like::
from django.http import HttpResponseRedirect
from django.shortcuts import render
- from django.views.generic import View
+ from django.views import View
from .forms import MyForm
diff --git a/docs/topics/class-based-views/mixins.txt b/docs/topics/class-based-views/mixins.txt
index 5212381a65..07b2eda2bc 100644
--- a/docs/topics/class-based-views/mixins.txt
+++ b/docs/topics/class-based-views/mixins.txt
@@ -226,7 +226,7 @@ We'll demonstrate this with the ``Author`` model we used in the
from django.http import HttpResponseForbidden, HttpResponseRedirect
from django.urls import reverse
- from django.views.generic import View
+ from django.views import View
from django.views.generic.detail import SingleObjectMixin
from books.models import Author
@@ -570,7 +570,7 @@ You can of course pass through keyword arguments to
would in your URLconf, such as if you wanted the ``AuthorInterest`` behavior
to also appear at another URL but using a different template::
- from django.views.generic import View
+ from django.views import View
class AuthorDetail(View):