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
a5391db7
Kaydet (Commit)
a5391db7
authored
Şub 09, 2014
tarafından
Baptiste Mispelon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed inaccuracies in generic mixins documentation.
üst
98dd8dd0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
generic-editing.txt
docs/ref/class-based-views/generic-editing.txt
+11
-0
mixins-editing.txt
docs/ref/class-based-views/mixins-editing.txt
+6
-4
No files found.
docs/ref/class-based-views/generic-editing.txt
Dosyayı görüntüle @
a5391db7
...
...
@@ -111,6 +111,12 @@ CreateView
creating objects for the example ``Author`` model would cause the
default ``template_name`` to be ``'myapp/author_create_form.html'``.
.. attribute:: object
When using ``CreateView`` you have access to ``self.object``, which is
the object being created. If the object hasn't been created yet, the
value will be ``None``.
**Example myapp/views.py**::
from django.views.generic.edit import CreateView
...
...
@@ -162,6 +168,11 @@ UpdateView
updating objects for the example ``Author`` model would cause the
default ``template_name`` to be ``'myapp/author_update_form.html'``.
.. attribute:: object
When using ``UpdateView`` you have access to ``self.object``, which is
the object being updated.
**Example myapp/views.py**::
from django.views.generic.edit import UpdateView
...
...
docs/ref/class-based-views/mixins-editing.txt
Dosyayı görüntüle @
a5391db7
...
...
@@ -12,7 +12,7 @@ The following mixins are used to construct Django's editing views:
.. note::
Examples of how these are combined into editing views can be found at
the documentation on
``Generic editing views`
`.
the documentation on
:doc:`/ref/class-based-views/generic-editing
`.
FormMixin
---------
...
...
@@ -112,9 +112,7 @@ ModelFormMixin
mixin have access to the
:attr:`~django.views.generic.detail.SingleObjectMixin.model` and
:attr:`~django.views.generic.detail.SingleObjectMixin.queryset` attributes,
describing the type of object that the ``ModelForm`` is manipulating. The
view also provides ``self.object``, the instance being manipulated. If the
instance is being created, ``self.object`` will be ``None``.
describing the type of object that the ``ModelForm`` is manipulating.
**Mixins**
...
...
@@ -218,6 +216,10 @@ ProcessFormView
The ``PUT`` action is also handled and just passes all parameters
through to :meth:`post`.
DeletionMixin
-------------
.. class:: django.views.generic.edit.DeletionMixin
Enables handling of the ``DELETE`` http action.
...
...
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