Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
b8874084
Kaydet (Commit)
b8874084
authored
Şub 22, 2014
tarafından
Marcin Sokół
Kaydeden (comit)
Baptiste Mispelon
Şub 22, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #22113 -- changed object_name to model_name in CBV docs.
Thanks to trac user nikunj.sg for the report.
üst
7e1376c2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
detail.py
django/views/generic/detail.py
+1
-1
mixins-multiple-object.txt
docs/ref/class-based-views/mixins-multiple-object.txt
+2
-2
mixins-single-object.txt
docs/ref/class-based-views/mixins-single-object.txt
+2
-2
mixins.txt
docs/topics/class-based-views/mixins.txt
+2
-2
No files found.
django/views/generic/detail.py
Dosyayı görüntüle @
b8874084
...
@@ -128,7 +128,7 @@ class SingleObjectTemplateResponseMixin(TemplateResponseMixin):
...
@@ -128,7 +128,7 @@ class SingleObjectTemplateResponseMixin(TemplateResponseMixin):
* the value of ``template_name`` on the view (if provided)
* the value of ``template_name`` on the view (if provided)
* the contents of the ``template_name_field`` field on the
* the contents of the ``template_name_field`` field on the
object instance that the view is operating upon (if available)
object instance that the view is operating upon (if available)
* ``<app_label>/<
object
_name><template_name_suffix>.html``
* ``<app_label>/<
model
_name><template_name_suffix>.html``
"""
"""
try
:
try
:
names
=
super
(
SingleObjectTemplateResponseMixin
,
self
)
.
get_template_names
()
names
=
super
(
SingleObjectTemplateResponseMixin
,
self
)
.
get_template_names
()
...
...
docs/ref/class-based-views/mixins-multiple-object.txt
Dosyayı görüntüle @
b8874084
...
@@ -154,7 +154,7 @@ MultipleObjectMixin
...
@@ -154,7 +154,7 @@ MultipleObjectMixin
the list of data that this view is manipulating. If
the list of data that this view is manipulating. If
``object_list`` is a queryset of Django objects and
``object_list`` is a queryset of Django objects and
:attr:`context_object_name` is not set,
:attr:`context_object_name` is not set,
the context name will be the ``
object
_name`` of the model that
the context name will be the ``
model
_name`` of the model that
the queryset is composed from, with postfix ``'_list'``
the queryset is composed from, with postfix ``'_list'``
appended. For example, the model ``Article`` would have a
appended. For example, the model ``Article`` would have a
context object named ``article_list``.
context object named ``article_list``.
...
@@ -210,4 +210,4 @@ MultipleObjectTemplateResponseMixin
...
@@ -210,4 +210,4 @@ MultipleObjectTemplateResponseMixin
Returns a list of candidate template names. Returns the following list:
Returns a list of candidate template names. Returns the following list:
* the value of ``template_name`` on the view (if provided)
* the value of ``template_name`` on the view (if provided)
* ``<app_label>/<
object
_name><template_name_suffix>.html``
* ``<app_label>/<
model
_name><template_name_suffix>.html``
docs/ref/class-based-views/mixins-single-object.txt
Dosyayı görüntüle @
b8874084
...
@@ -73,7 +73,7 @@ SingleObjectMixin
...
@@ -73,7 +73,7 @@ SingleObjectMixin
Return the context variable name that will be used to contain the
Return the context variable name that will be used to contain the
data that this view is manipulating. If :attr:`context_object_name` is
data that this view is manipulating. If :attr:`context_object_name` is
not set, the context name will be constructed from the ``
object
_name``
not set, the context name will be constructed from the ``
model
_name``
of the model that the queryset is composed from. For example, the model
of the model that the queryset is composed from. For example, the model
``Article`` would have context object named ``'article'``.
``Article`` would have context object named ``'article'``.
...
@@ -130,4 +130,4 @@ SingleObjectTemplateResponseMixin
...
@@ -130,4 +130,4 @@ SingleObjectTemplateResponseMixin
* the value of ``template_name`` on the view (if provided)
* the value of ``template_name`` on the view (if provided)
* the contents of the ``template_name_field`` field on the
* the contents of the ``template_name_field`` field on the
object instance that the view is operating upon (if available)
object instance that the view is operating upon (if available)
* ``<app_label>/<
object
_name><template_name_suffix>.html``
* ``<app_label>/<
model
_name><template_name_suffix>.html``
docs/topics/class-based-views/mixins.txt
Dosyayı görüntüle @
b8874084
...
@@ -117,7 +117,7 @@ overriding
...
@@ -117,7 +117,7 @@ overriding
:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names()`
:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names()`
as discussed above. It actually provides a fairly sophisticated set of options,
as discussed above. It actually provides a fairly sophisticated set of options,
but the main one that most people are going to use is
but the main one that most people are going to use is
``<app_label>/<
object
_name>_detail.html``. The ``_detail`` part can be changed
``<app_label>/<
model
_name>_detail.html``. The ``_detail`` part can be changed
by setting
by setting
:attr:`~django.views.generic.detail.SingleObjectTemplateResponseMixin.template_name_suffix`
:attr:`~django.views.generic.detail.SingleObjectTemplateResponseMixin.template_name_suffix`
on a subclass to something else. (For instance, the :doc:`generic edit
on a subclass to something else. (For instance, the :doc:`generic edit
...
@@ -163,7 +163,7 @@ as with :class:`~django.views.generic.detail.SingleObjectTemplateResponseMixin`
...
@@ -163,7 +163,7 @@ as with :class:`~django.views.generic.detail.SingleObjectTemplateResponseMixin`
above, this overrides ``get_template_names()`` to provide :meth:`a range of
above, this overrides ``get_template_names()`` to provide :meth:`a range of
options <django.views.generic.list.MultipleObjectTemplateResponseMixin>`,
options <django.views.generic.list.MultipleObjectTemplateResponseMixin>`,
with the most commonly-used being
with the most commonly-used being
``<app_label>/<
object
_name>_list.html``, with the ``_list`` part again
``<app_label>/<
model
_name>_list.html``, with the ``_list`` part again
being taken from the
being taken from the
:attr:`~django.views.generic.list.MultipleObjectTemplateResponseMixin.template_name_suffix`
:attr:`~django.views.generic.list.MultipleObjectTemplateResponseMixin.template_name_suffix`
attribute. (The date based generic views use suffixes such as ``_archive``,
attribute. (The date based generic views use suffixes such as ``_archive``,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment