Loading docs/topics/class-based-views/index.txt +4 −3 Original line number Diff line number Diff line Loading @@ -69,9 +69,10 @@ and override the template name:: template_name = "about.html" Then we just need to add this new view into our URLconf. `~django.views.generic.base.TemplateView` is a class, not a function, so we point the URL to the :meth:`~django.views.generic.base.View.as_view` class method instead, which provides a function-like entry to class-based views:: :class:`~django.views.generic.base.TemplateView` is a class, not a function, so we point the URL to the :meth:`~django.views.generic.base.View.as_view` class method instead, which provides a function-like entry to class-based views:: # urls.py from django.conf.urls import patterns Loading docs/topics/http/shortcuts.txt +2 −1 Original line number Diff line number Diff line Loading @@ -167,7 +167,8 @@ This example is equivalent to:: The arguments could be: * A model: the model's `get_absolute_url()` function will be called. * A model: the model's :meth:`~django.db.models.Model.get_absolute_url()` function will be called. * A view name, possibly with arguments: :func:`urlresolvers.reverse <django.core.urlresolvers.reverse>` will be used to reverse-resolve the Loading Loading
docs/topics/class-based-views/index.txt +4 −3 Original line number Diff line number Diff line Loading @@ -69,9 +69,10 @@ and override the template name:: template_name = "about.html" Then we just need to add this new view into our URLconf. `~django.views.generic.base.TemplateView` is a class, not a function, so we point the URL to the :meth:`~django.views.generic.base.View.as_view` class method instead, which provides a function-like entry to class-based views:: :class:`~django.views.generic.base.TemplateView` is a class, not a function, so we point the URL to the :meth:`~django.views.generic.base.View.as_view` class method instead, which provides a function-like entry to class-based views:: # urls.py from django.conf.urls import patterns Loading
docs/topics/http/shortcuts.txt +2 −1 Original line number Diff line number Diff line Loading @@ -167,7 +167,8 @@ This example is equivalent to:: The arguments could be: * A model: the model's `get_absolute_url()` function will be called. * A model: the model's :meth:`~django.db.models.Model.get_absolute_url()` function will be called. * A view name, possibly with arguments: :func:`urlresolvers.reverse <django.core.urlresolvers.reverse>` will be used to reverse-resolve the Loading