Loading django/views/__init__.py +3 −0 Original line number Diff line number Diff line from django.views.generic.base import View __all__ = ['View'] docs/internals/contributing/writing-code/coding-style.txt +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ Imports * Use convenience imports whenever available. For example, do this:: from django.views.generic import View from django.views import View instead of:: Loading docs/ref/class-based-views/base.txt +7 −2 Original line number Diff line number Diff line Loading @@ -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** Loading @@ -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 docs/releases/1.10.txt +2 −1 Original line number Diff line number Diff line Loading @@ -208,7 +208,8 @@ Forms Generic Views ^^^^^^^^^^^^^ * ... * The :class:`~django.views.generic.base.View` class can now be imported from ``django.views``. Internationalization ^^^^^^^^^^^^^^^^^^^^ Loading docs/topics/class-based-views/intro.txt +3 −3 Original line number Diff line number Diff line Loading @@ -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): Loading Loading @@ -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" Loading Loading @@ -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 Loading Loading
django/views/__init__.py +3 −0 Original line number Diff line number Diff line from django.views.generic.base import View __all__ = ['View']
docs/internals/contributing/writing-code/coding-style.txt +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ Imports * Use convenience imports whenever available. For example, do this:: from django.views.generic import View from django.views import View instead of:: Loading
docs/ref/class-based-views/base.txt +7 −2 Original line number Diff line number Diff line Loading @@ -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** Loading @@ -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
docs/releases/1.10.txt +2 −1 Original line number Diff line number Diff line Loading @@ -208,7 +208,8 @@ Forms Generic Views ^^^^^^^^^^^^^ * ... * The :class:`~django.views.generic.base.View` class can now be imported from ``django.views``. Internationalization ^^^^^^^^^^^^^^^^^^^^ Loading
docs/topics/class-based-views/intro.txt +3 −3 Original line number Diff line number Diff line Loading @@ -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): Loading Loading @@ -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" Loading Loading @@ -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 Loading