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
7102b996
Kaydet (Commit)
7102b996
authored
Ock 09, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added best practices for versionadded/changed annotations.
üst
8f4877c8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
1 deletion
+44
-1
submitting-patches.txt
...nternals/contributing/writing-code/submitting-patches.txt
+2
-1
writing-documentation.txt
docs/internals/contributing/writing-documentation.txt
+40
-0
spelling_wordlist
docs/spelling_wordlist
+2
-0
No files found.
docs/internals/contributing/writing-code/submitting-patches.txt
Dosyayı görüntüle @
7102b996
...
...
@@ -320,7 +320,8 @@ New Features
* Are there tests to "exercise" all of the new code?
* Is there a release note in ``docs/releases/A.B.txt``?
* Is there documentation for the feature and is it annotated appropriately with
* Is there documentation for the feature and is it :ref:`annotated
appropriately <documenting-new-features>` with
``.. versionadded:: A.B`` or ``.. versionchanged:: A.B``?
Deprecating a feature
...
...
docs/internals/contributing/writing-documentation.txt
Dosyayı görüntüle @
7102b996
...
...
@@ -216,6 +216,46 @@ General improvements, or other changes to the APIs that should be emphasized
should use the "``.. versionchanged:: X.Y``" directive (with the same format
as the ``versionadded`` mentioned above.
These ``versionadded`` and ``versionchanged`` blocks should be "self-contained."
In other words, since we only keep these annotations around for two releases,
it's nice to be able to remove the annotation and its contents without having
to reflow, reindent, or edit the surrounding text. For example, instead of
putting the entire description of a new or changed feature in a block, do
something like this::
.. class:: Author(first_name, last_name, middle_name=None)
A person who writes books.
``first_name`` is ...
...
``middle_name`` is ...
.. versionchanged:: A.B
The ``middle_name`` argument was added.
Put the changed annotation notes at the bottom of a section, not the top.
Also, avoid referring to a specific version of Django outside a
``versionadded`` or ``versionchanged`` block. Even inside a block, it's often
redundant to do so as these annotations render as "New in Django A.B:" and
"Changed in Django A.B", respectively.
If a function, attribute, etc. is added, it's also okay to use a
``versionadded`` annotation like this::
.. attribute:: Author.middle_name
.. versionadded:: A.B
An author's middle name.
We can simply remove the ``.. versionadded:: A.B`` annotation without any
indentation changes when the time comes.
An example
----------
...
...
docs/spelling_wordlist
Dosyayı görüntüle @
7102b996
...
...
@@ -515,9 +515,11 @@ refactored
refactorings
refactors
referer
reflow
regex
regexes
reimplement
reindent
reindex
releasers
removetags
...
...
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