mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #25385 -- Allowed importing views.generic.View from views.View.
This commit is contained in:
parent
0bc5cd6280
commit
3d6474e1a5
7 changed files with 19 additions and 10 deletions
|
@ -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):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue