Fixed #25385 -- Allowed importing views.generic.View from views.View.

This commit is contained in:
Varun Sharma 2016-01-09 17:10:08 +05:30 committed by Tim Graham
parent 0bc5cd6280
commit 3d6474e1a5
7 changed files with 19 additions and 10 deletions

View file

@ -19,7 +19,12 @@ View
.. class:: django.views.generic.base.View
The master class-based base view. All other class-based views inherit from
this base class.
this base class. It isn't strictly a generic view and thus can also be
imported from ``django.views``.
.. versionchanged:: 1.10
The ability to import from ``django.views`` was added.
**Method Flowchart**
@ -30,7 +35,7 @@ View
**Example views.py**::
from django.http import HttpResponse
from django.views.generic import View
from django.views import View
class MyView(View):