{"title":"문서 작성하기","version":"2.2","locale":"ko","docname":"internals/contributing/writing-documentation","url":"/ko/2.2/internals/contributing/writing-documentation/","canonical":"https://djangodocs.dev/ko/2.2/internals/contributing/writing-documentation/","summary":"우리는 문서의 일관성과 가독성을 매우 중요하게 여깁니다. Django는 저널리즘 환경에서 창조된 것이니까요! 우리는 문서를 코드처럼 다루며, 될 수 있는 한 자주 개선하는 것을 목표로 합니다. 문서 변경은 다음 두 가지 형태로 이뤄집니다. 일반적인 개선: 오탈자 수정, 명료한 문장과 더 많은…","html":"<h1>문서 작성하기<a class=\"heading-anchor\" href=\"#writing-documentation\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>우리는 문서의 일관성과 가독성을 매우 중요하게 여깁니다. Django는 저널리즘 환경에서 창조된 것이니까요! 우리는 문서를 코드처럼 다루며, 될 수 있는 한 자주 개선하는 것을 목표로 합니다.</p>\n<p>문서 변경은 다음 두 가지 형태로 이뤄집니다.</p>\n<ul class=\"simple\">\n<li><p>일반적인 개선: 오탈자 수정, 명료한 문장과 더 많은 예제를 통한 오류 수정 및 예제 개선.</p></li>\n<li><p>새로운 기능: 최종 릴리스 이후에 프레임워크에 추가된 기능에 대한 문서화.</p></li>\n</ul>\n<p>이 절에서는 저자들이 어떻게 유용하고도 오류를 적게 일으키는 방식으로 문서 변경을 다루는지 설명합니다.</p>\n<section id=\"getting-the-raw-documentation\">\n<h2>문서 소스 얻기<a class=\"heading-anchor\" href=\"#getting-the-raw-documentation\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Django 문서는 <a class=\"reference external\" href=\"https://docs.djangoproject.com/\">https://docs.djangoproject.com/</a>에서 HTML로 읽도록 되어 있지만, 유연성을 위해 텍스트 파일의 묶음으로서 편집합니다. 이 파일들은 Django 릴리스의 최상위 <code class=\"docutils literal notranslate\"><span class=\"pre\">docs/</span></code> 디렉터리에 있습니다.</p>\n<p>문서 작성에 참여하고 싶다면 소스 코드 저장소에서 Django 개발 버전을 받으세요(<a class=\"reference internal\" href=\"/ko/2.2/topics/install/#installing-development-version\"><span class=\"std std-ref\">Installing the development version</span></a> 참조). 개발 버전에는 최신 코드와 함께 최신 문서가 있습니다. 문서 수정과 개선은 커미터의 재량에 따라 최종 릴리스 브랜치에 백포트합니다. 최종 릴리스에 대한 문서가 최신의 올바른 내용을 담고 있는 것은 매우 유용하기 때문입니다(<a class=\"reference internal\" href=\"/ko/2.2/intro/whatsnext/#differences-between-doc-versions\"><span class=\"std std-ref\">버전 간 차이점</span></a> 참조).</p>\n</section>\n<section id=\"getting-started-with-sphinx\">\n<h2>Sphinx 시작하기<a class=\"heading-anchor\" href=\"#getting-started-with-sphinx\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Django 문서는 <a class=\"reference external\" href=\"http://sphinx-doc.org/\">docutils</a>를 기반으로 하는 <a class=\"reference external\" href=\"http://docutils.sourceforge.net/\">Sphinx</a> 문서화 시스템을 사용합니다. Sphinx는 가벼운 형식의 일반 텍스트 문서를 HTML, PDF, 기타 여러 형식으로 변환해줍니다.</p>\n<p>로컬에서 문서를 빌드하려면 Sphinx를 설치하세요.</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-0-unix-label\">Linux / macOS</p><div class=\"code-block\" data-language=\"console\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code><span class=\"gp\">$ </span>pip<span class=\"w\"> </span>install<span class=\"w\"> </span>Sphinx\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-0-windows-label\">Windows</p><div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Windows shell\"><code><span class=\"gp\">...\\&gt;</span> pip install Sphinx\n</code></pre></div></div></div>\n<p><code class=\"docutils literal notranslate\"><span class=\"pre\">docs</span></code> 디렉터리에서 HTML을 빌드합니다.</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-1-unix-label\">Linux / macOS</p><div class=\"code-block\" data-language=\"console\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code><span class=\"gp\">$ </span>make<span class=\"w\"> </span>html\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-1-windows-label\">Windows</p><div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Windows shell\"><code><span class=\"gp\">...\\&gt;</span> make.bat html\n</code></pre></div></div></div>\n<p>문서 작성에 참여하려면 <a class=\"reference external\" href=\"https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html#rst-index\" title=\"(Sphinx v9.1.1에서)\"><span class=\"xref std std-ref\">reStructuredText reference</span></a>를 읽어보세요.</p>\n<p>로컬에 구축한 문서화 시스템에서는 <a class=\"reference external\" href=\"https://docs.djangoproject.com\">docs.djangoproject.com</a>와 다른 테마가 적용됩니다. 이것은 괜찮습니다! 변경 사항이 로컬 머신에서 문제를 일으키지 않는다면 웹사이트에서도 제대로 보일 것입니다.</p>\n</section>\n<section id=\"how-the-documentation-is-organized\">\n<h2>이 문서의 구조<a class=\"heading-anchor\" href=\"#how-the-documentation-is-organized\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>문서는 여러 범주로 나뉩니다.</p>\n<ul>\n<li><p><a class=\"reference internal\" href=\"/ko/2.2/intro/\"><span class=\"doc\">튜토리얼</span></a>은 독자로 하여금 차근차근 따라 하면서 뭔가 만들어 볼 수 있도록 해줍니다.</p>\n<p>튜토리얼에서 가장 중요한 것은 독자가 최대한 빠르게 유용한 것을 만들어 봄으로써 자신감을 갖도록 하는 것입니다.</p>\n<p>우리가 해결하고자 하는 문제의 성질을 설명하여, 우리가 무엇을 이루려고 하는지 독자에게 이해시킵니다. 동작 원리를 설명하려고 애쓰지 않아도 됩니다. 무엇을 설명하는지보다 독자가 무엇을 하는지가 더 중요합니다. 무엇을 했는지 나중에 되짚어보면서 설명하는 것이 도움이 될 것입니다.</p>\n</li>\n<li><p><a class=\"reference internal\" href=\"/ko/2.2/topics/\"><span class=\"doc\">주제 가이드</span></a>는 개념 또는 주제를 고수준에서 설명하는 것을 목적으로 합니다.</p>\n<p>참고 자료에 있는 내용을 반복하지 말고 링크를 거세요. 예제를 사용하고, 매우 기초적인 내용에 대한 설명을 아끼지 마세요. 그런 설명을 필요로 하는 사람이 있을 지 모릅니다.</p>\n<p>해당 주제를 처음 접하는 사람들을 위해 배경 지식을 설명하는 것은 그들이 이미 알고 있는 것과 연결하는 데 도움이 됩니다.</p>\n</li>\n<li><p><a class=\"reference internal\" href=\"/ko/2.2/ref/\"><span class=\"doc\">참조 가이드</span></a>는 API에 대한 기술적 참조를 포함합니다. 그것들은 Django의 내부 동작 원리를 기술하고 사용법을 가르칩니다.</p>\n<p>참고 자료는 주제에 집중해야 합니다. 독자가 이미 기본 개념을 알고 있되 Django에서 그것을 어떻게 다루는지에 대한 설명이 필요할 것으로 가정하세요.</p>\n<p>참조 가이드는 일반적인 설명을 위한 것이 아닙니다. 기본 개념에 대해 설명하고 있다고 느껴지면, 그것을 주제 가이드로 옮기기 바랍니다.</p>\n</li>\n<li><p><a class=\"reference internal\" href=\"/ko/2.2/howto/\"><span class=\"doc\">How-to 가이드</span></a>는 주요한 주제에 있어서 독자가 따라할 수 있는 레시피입니다.</p>\n<p>how-to 가이드에서는 사용자가 달성하고자 하는 것이 중요합니다. how-to에서는 Django의 내부 구현에 대한 세부 사항보다는 결과물을 도출하는 데 집중해야 합니다.</p>\n<p>how-to 가이드는 튜토리얼보다 수준이 높으며, 독자가 Django의 동작 원리에 대한 지식이 있을 것으로 간주합니다. 독자가 이미 튜토리얼을 읽은 것으로 간주하고, 같은 내용을 반복하지 말고 관련 튜토리얼에 대한 참조를 제공하세요.</p>\n</li>\n</ul>\n</section>\n<section id=\"writing-style\">\n<h2>문체<a class=\"heading-anchor\" href=\"#writing-style\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>가상의 인물을 가리킬 때는 “세션 쿠키를 가진 사용자”와 같이 중성적인 대명사(they/their/them)을 사용해야 합니다. 예:</p>\n<ul class=\"simple\">\n<li><p>he 또는 she 대신 they를 사용합니다.</p></li>\n<li><p>him 또는 her 대신 them을 사용합니다.</p></li>\n<li><p>his 또는 her 대신 their를 사용합니다.</p></li>\n<li><p>his 또는 hers 대신 theirs를 사용합니다.</p></li>\n<li><p>himself 또는 herself 대신 themselves를 사용합니다.</p></li>\n</ul>\n<p>Try to avoid using words that minimize the difficulty involved in a task or\noperation, such as “easily”, “simply”, “just”, “merely”, “straightforward”, and\nso on. People’s experience may not match your expectations, and they may become\nfrustrated when they do not find a step as “straightforward” or “simple” as it\nis implied to be.</p>\n</section>\n<section id=\"commonly-used-terms\">\n<h2>공통적인 용어<a class=\"heading-anchor\" href=\"#commonly-used-terms\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>다음은 문서에서 공통적으로 사용되는 용어에 대한 지침입니다.</p>\n<ul class=\"simple\">\n<li><p><strong>Django</strong> – 프레임워크를 지칭할 때에는 첫 글자를 대문자로 하여 Django로 표기합니다. Python 코드와 djangoproject.com 로고에서만 소문자를 사용합니다.</p></li>\n<li><p><strong>email</strong> – 하이픈을 넣지 않습니다.</p></li>\n<li><p><strong>MySQL</strong>, <strong>PostgreSQL</strong>, <strong>SQLite</strong></p></li>\n<li><p><strong>SQL</strong> – SQL을 가리킬 때, 그 발음은 “시퀄”이 아니라 “에스큐엘”로 합니다. 따라서 “Returns an SQL expression”과 같은 표현에서 “SQL” 앞에는 “a”가 아닌 “an”이 옵니다.</p></li>\n<li><p><strong>Python</strong> – 언어를 가리킬 때에는 첫 글자를 대문자로 하여 Python으로 표기합니다.</p></li>\n<li><p><strong>realize</strong>, <strong>customize</strong>, <strong>initialize</strong> 등. – 미국식으로 “ize”를 붙이며, “ise”는 붙이지 않습니다.</p></li>\n<li><p><strong>subclass</strong> – 하이픈이 없는 하나의 단어로, 동사(“subclass that model”) 또는 명사(“create a subclass”)입니다.</p></li>\n<li><p><strong>Web</strong>, <strong>World Wide Web</strong>, <strong>the Web</strong> – 월드 와이드 웹을 가리키는 Web은 항상 첫 글자를 대문자로 표기합니다.</p></li>\n<li><p><strong>website</strong> – 대문자 없이 한 단어로 씁니다.</p></li>\n</ul>\n</section>\n<section id=\"django-specific-terminology\">\n<h2>Django 관련 용어<a class=\"heading-anchor\" href=\"#django-specific-terminology\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<ul class=\"simple\">\n<li><p><strong>model</strong> – 대문자가 아닙니다.</p></li>\n<li><p><strong>template</strong> – 대문자가 아닙니다.</p></li>\n<li><p><strong>URLconf</strong> – 처음 세 글자를 대문자로 하며, “conf”와의 사이에 공백을 두지 않습니다.</p></li>\n<li><p><strong>view</strong> – 대문자가 아닙니다.</p></li>\n</ul>\n</section>\n<section id=\"guidelines-for-restructuredtext-files\">\n<h2>reStructuredText 파일 안내<a class=\"heading-anchor\" href=\"#guidelines-for-restructuredtext-files\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>These guidelines regulate the format of our reST (reStructuredText)\ndocumentation:</p>\n<ul>\n<li><p>In section titles, capitalize only initial words and proper nouns.</p></li>\n<li><p>Wrap the documentation at 80 characters wide, unless a code example\nis significantly less readable when split over two lines, or for another\ngood reason.</p></li>\n<li><p>The main thing to keep in mind as you write and edit docs is that the\nmore semantic markup you can add the better. So:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code>Add ``django.contrib.auth`` to your ``INSTALLED_APPS``...\n</code></pre></div>\n<p>Isn’t nearly as helpful as:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code>Add :mod:`django.contrib.auth` to your :setting:`INSTALLED_APPS`...\n</code></pre></div>\n<p>This is because Sphinx will generate proper links for the latter, which\ngreatly helps readers.</p>\n<p>You can prefix the target with a <code class=\"docutils literal notranslate\"><span class=\"pre\">~</span></code> (that’s a tilde) to get just the\n“last bit” of that path. So <code class=\"docutils literal notranslate\"><span class=\"pre\">:mod:`~django.contrib.auth`</span></code> will just\ndisplay a link with the title “auth”.</p>\n</li>\n<li><p>Use <a class=\"reference external\" href=\"https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#module-sphinx.ext.intersphinx\" title=\"(Sphinx v9.1.1에서)\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">intersphinx</span></code></a> to reference Python’s and Sphinx’\ndocumentation.</p></li>\n<li><p>Add <code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">code-block::</span> <span class=\"pre\">&lt;lang&gt;</span></code> to literal blocks so that they get\nhighlighted. Prefer relying on automatic highlighting simply using <code class=\"docutils literal notranslate\"><span class=\"pre\">::</span></code>\n(two colons). This has the benefit that if the code contains some invalid\nsyntax, it won’t be highlighted. Adding <code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">code-block::</span> <span class=\"pre\">python</span></code>, for\nexample, will force highlighting despite invalid syntax.</p></li>\n<li><p>Use these heading styles:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"o\">===</span>\n<span class=\"n\">One</span>\n<span class=\"o\">===</span>\n\n<span class=\"n\">Two</span>\n<span class=\"o\">===</span>\n\n<span class=\"n\">Three</span>\n<span class=\"o\">-----</span>\n\n<span class=\"n\">Four</span>\n<span class=\"o\">~~~~</span>\n\n<span class=\"n\">Five</span>\n<span class=\"o\">^^^^</span>\n</code></pre></div>\n</li>\n<li><p>Use <a class=\"reference external\" href=\"https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-rfc\" title=\"(Sphinx v9.1.1에서)\"><code class=\"xref rst rst-role docutils literal notranslate\"><span class=\"pre\">:rfc:</span></code></a> to reference RFC and and try to link to the\nrelevant section if possible. For example, use <code class=\"docutils literal notranslate\"><span class=\"pre\">:rfc:`2324#section-2.3.2`</span></code>\nor <code class=\"docutils literal notranslate\"><span class=\"pre\">:rfc:`Custom</span> <span class=\"pre\">link</span> <span class=\"pre\">text</span> <span class=\"pre\">&lt;2324#section-2.3.2&gt;`</span></code>.</p></li>\n</ul>\n</section>\n<section id=\"django-specific-markup\">\n<h2>Django-specific markup<a class=\"heading-anchor\" href=\"#django-specific-markup\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Besides <a class=\"reference external\" href=\"https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html#rst-index\" title=\"(Sphinx v9.1.1에서)\"><span class=\"xref std std-ref\">Sphinx’s built-in markup</span></a>, Django’s docs\ndefine some extra description units:</p>\n<ul>\n<li><p>Settings:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"o\">..</span> <span class=\"n\">setting</span><span class=\"p\">::</span> <span class=\"n\">INSTALLED_APPS</span>\n</code></pre></div>\n<p>To link to a setting, use <code class=\"docutils literal notranslate\"><span class=\"pre\">:setting:`INSTALLED_APPS`</span></code>.</p>\n</li>\n<li><p>Template tags:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"o\">..</span> <span class=\"n\">templatetag</span><span class=\"p\">::</span> <span class=\"n\">regroup</span>\n</code></pre></div>\n<p>To link, use <code class=\"docutils literal notranslate\"><span class=\"pre\">:ttag:`regroup`</span></code>.</p>\n</li>\n<li><p>Template filters:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"o\">..</span> <span class=\"n\">templatefilter</span><span class=\"p\">::</span> <span class=\"n\">linebreaksbr</span>\n</code></pre></div>\n<p>To link, use <code class=\"docutils literal notranslate\"><span class=\"pre\">:tfilter:`linebreaksbr`</span></code>.</p>\n</li>\n<li><p>Field lookups (i.e. <code class=\"docutils literal notranslate\"><span class=\"pre\">Foo.objects.filter(bar__exact=whatever)</span></code>):</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"o\">..</span> <span class=\"n\">fieldlookup</span><span class=\"p\">::</span> <span class=\"n\">exact</span>\n</code></pre></div>\n<p>To link, use <code class=\"docutils literal notranslate\"><span class=\"pre\">:lookup:`exact`</span></code>.</p>\n</li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">django-admin</span></code> commands:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"o\">..</span> <span class=\"n\">django</span><span class=\"o\">-</span><span class=\"n\">admin</span><span class=\"p\">::</span> <span class=\"n\">migrate</span>\n</code></pre></div>\n<p>To link, use <code class=\"docutils literal notranslate\"><span class=\"pre\">:djadmin:`migrate`</span></code>.</p>\n</li>\n<li><p><code class=\"docutils literal notranslate\"><span class=\"pre\">django-admin</span></code> command-line options:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"o\">..</span> <span class=\"n\">django</span><span class=\"o\">-</span><span class=\"n\">admin</span><span class=\"o\">-</span><span class=\"n\">option</span><span class=\"p\">::</span> <span class=\"o\">--</span><span class=\"n\">traceback</span>\n</code></pre></div>\n<p>To link, use <code class=\"docutils literal notranslate\"><span class=\"pre\">:option:`command_name</span> <span class=\"pre\">--traceback`</span></code> (or omit <code class=\"docutils literal notranslate\"><span class=\"pre\">command_name</span></code>\nfor the options shared by all commands like <code class=\"docutils literal notranslate\"><span class=\"pre\">--verbosity</span></code>).</p>\n</li>\n<li><p>Links to Trac tickets (typically reserved for patch release notes):</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code>:ticket:`12345`\n</code></pre></div>\n</li>\n</ul>\n<p>Django’s documentation uses a custom <code class=\"docutils literal notranslate\"><span class=\"pre\">console</span></code> directive for documenting\ncommand-line examples involving <code class=\"docutils literal notranslate\"><span class=\"pre\">django-admin.py</span></code>, <code class=\"docutils literal notranslate\"><span class=\"pre\">manage.py</span></code>, <code class=\"docutils literal notranslate\"><span class=\"pre\">python</span></code>,\netc.). In the HTML documentation, it renders a two-tab UI, with one tab showing\na Unix-style command prompt and a second tab showing a Windows prompt.</p>\n<p>For example, you can replace this fragment:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code>use this command:\n\n.. code-block:: console\n\n    $ python manage.py shell\n</code></pre></div>\n<p>with this one:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code>use this command:\n\n.. console::\n\n    $ python manage.py shell\n</code></pre></div>\n<p>Notice two things:</p>\n<ul class=\"simple\">\n<li><p>You usually will replace occurrences of the <code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">code-block::</span> <span class=\"pre\">console</span></code>\ndirective.</p></li>\n<li><p>You don’t need to change the actual content of the code example. You still\nwrite it assuming a Unix-y environment (i.e. a <code class=\"docutils literal notranslate\"><span class=\"pre\">'$'</span></code> prompt symbol,\n<code class=\"docutils literal notranslate\"><span class=\"pre\">'/'</span></code> as filesystem path components separator, etc.)</p></li>\n</ul>\n<p>The example above will render a code example block with two tabs. The first\none will show:</p>\n<div class=\"code-block\" data-language=\"console\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code><span class=\"gp\">$ </span>python<span class=\"w\"> </span>manage.py<span class=\"w\"> </span>shell\n</code></pre></div>\n<p>(No changes from what <code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">code-block::</span> <span class=\"pre\">console</span></code> would have rendered).</p>\n<p>The second one will show:</p>\n<div class=\"code-block\" data-language=\"doscon\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Windows</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Windows code\"><code><span class=\"gp\">...\\&gt;</span> py manage.py shell\n</code></pre></div>\n</section>\n<section id=\"documenting-new-features\">\n<span id=\"id3\"></span><h2>Documenting new features<a class=\"heading-anchor\" href=\"#documenting-new-features\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Our policy for new features is:</p>\n<blockquote>\n<div><p>All documentation of new features should be written in a way that\nclearly designates the features are only available in the Django\ndevelopment version. Assume documentation readers are using the latest\nrelease, not the development version.</p>\n</div></blockquote>\n<p>Our preferred way for marking new features is by prefacing the features’\ndocumentation with: “<code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">versionadded::</span> <span class=\"pre\">X.Y</span></code>”, followed by a mandatory\nblank line and an optional description (indented).</p>\n<p>General improvements, or other changes to the APIs that should be emphasized\nshould use the “<code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">versionchanged::</span> <span class=\"pre\">X.Y</span></code>” directive (with the same format\nas the <code class=\"docutils literal notranslate\"><span class=\"pre\">versionadded</span></code> mentioned above.</p>\n<p>These <code class=\"docutils literal notranslate\"><span class=\"pre\">versionadded</span></code> and <code class=\"docutils literal notranslate\"><span class=\"pre\">versionchanged</span></code> blocks should be “self-contained.”\nIn other words, since we only keep these annotations around for two releases,\nit’s nice to be able to remove the annotation and its contents without having\nto reflow, reindent, or edit the surrounding text. For example, instead of\nputting the entire description of a new or changed feature in a block, do\nsomething like this:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code>.. class:: Author(first_name, last_name, middle_name=None)\n\n    A person who writes books.\n\n    ``first_name`` is ...\n\n    ...\n\n    ``middle_name`` is ...\n\n    .. versionchanged:: A.B\n\n        The ``middle_name`` argument was added.\n</code></pre></div>\n<p>Put the changed annotation notes at the bottom of a section, not the top.</p>\n<p>Also, avoid referring to a specific version of Django outside a\n<code class=\"docutils literal notranslate\"><span class=\"pre\">versionadded</span></code> or <code class=\"docutils literal notranslate\"><span class=\"pre\">versionchanged</span></code> block. Even inside a block, it’s often\nredundant to do so as these annotations render as “New in Django A.B:” and\n“Changed in Django A.B”, respectively.</p>\n<p>If a function, attribute, etc. is added, it’s also okay to use a\n<code class=\"docutils literal notranslate\"><span class=\"pre\">versionadded</span></code> annotation like this:</p>\n<div class=\"code-block\" data-language=\"default\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Code</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Code code\"><code><span class=\"o\">..</span> <span class=\"n\">attribute</span><span class=\"p\">::</span> <span class=\"n\">Author</span><span class=\"o\">.</span><span class=\"n\">middle_name</span>\n\n    <span class=\"o\">..</span> <span class=\"n\">versionadded</span><span class=\"p\">::</span> <span class=\"n\">A</span><span class=\"o\">.</span><span class=\"n\">B</span>\n\n    <span class=\"n\">An</span> <span class=\"n\">author</span><span class=\"s1\">&#39;s middle name.</span>\n</code></pre></div>\n<p>We can simply remove the <code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">versionadded::</span> <span class=\"pre\">A.B</span></code> annotation without any\nindentation changes when the time comes.</p>\n</section>\n<section id=\"minimizing-images\">\n<h2>Minimizing images<a class=\"heading-anchor\" href=\"#minimizing-images\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Optimize image compression where possible. For PNG files, use OptiPNG and\nAdvanceCOMP’s <code class=\"docutils literal notranslate\"><span class=\"pre\">advpng</span></code>:</p>\n<div class=\"code-block\" data-language=\"console\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code><span class=\"gp\">$ </span><span class=\"nb\">cd</span><span class=\"w\"> </span>docs\n<span class=\"gp\">$ </span>optipng<span class=\"w\"> </span>-o7<span class=\"w\"> </span>-zm1-9<span class=\"w\"> </span>-i0<span class=\"w\"> </span>-strip<span class=\"w\"> </span>all<span class=\"w\"> </span><span class=\"sb\">`</span>find<span class=\"w\"> </span>.<span class=\"w\"> </span>-type<span class=\"w\"> </span>f<span class=\"w\"> </span>-not<span class=\"w\"> </span>-path<span class=\"w\"> </span><span class=\"s2\">&quot;./_build/*&quot;</span><span class=\"w\"> </span>-name<span class=\"w\"> </span><span class=\"s2\">&quot;*.png&quot;</span><span class=\"sb\">`</span>\n<span class=\"gp\">$ </span>advpng<span class=\"w\"> </span>-z4<span class=\"w\"> </span><span class=\"sb\">`</span>find<span class=\"w\"> </span>.<span class=\"w\"> </span>-type<span class=\"w\"> </span>f<span class=\"w\"> </span>-not<span class=\"w\"> </span>-path<span class=\"w\"> </span><span class=\"s2\">&quot;./_build/*&quot;</span><span class=\"w\"> </span>-name<span class=\"w\"> </span><span class=\"s2\">&quot;*.png&quot;</span><span class=\"sb\">`</span>\n</code></pre></div>\n<p>This is based on OptiPNG version 0.7.5. Older versions may complain about the\n<code class=\"docutils literal notranslate\"><span class=\"pre\">--strip</span> <span class=\"pre\">all</span></code> option being lossy.</p>\n</section>\n<section id=\"an-example\">\n<h2>예제:<a class=\"heading-anchor\" href=\"#an-example\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>For a quick example of how it all fits together, consider this hypothetical\nexample:</p>\n<ul>\n<li><p>First, the <code class=\"docutils literal notranslate\"><span class=\"pre\">ref/settings.txt</span></code> document could have an overall layout\nlike this:</p>\n<div class=\"code-block\" data-language=\"rst\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Rst</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Rst code\"><code><span class=\"gh\">========</span>\n<span class=\"gh\">Settings</span>\n<span class=\"gh\">========</span>\n\n<span class=\"c\">...</span>\n\n<span class=\"p\">..</span> <span class=\"nt\">_available-settings:</span>\n\n<span class=\"gh\">Available settings</span>\n<span class=\"gh\">==================</span>\n\n<span class=\"c\">...</span>\n\n<span class=\"p\">..</span> <span class=\"nt\">_deprecated-settings:</span>\n\n<span class=\"gh\">Deprecated settings</span>\n<span class=\"gh\">===================</span>\n\n<span class=\"c\">...</span>\n</code></pre></div>\n</li>\n<li><p>Next, the <code class=\"docutils literal notranslate\"><span class=\"pre\">topics/settings.txt</span></code> document could contain something like\nthis:</p>\n<div class=\"code-block\" data-language=\"rst\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Rst</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Rst code\"><code>You can access a :ref:`listing of all available settings\n<span class=\"nt\">&lt;available-settings&gt;</span>`. For a list of deprecated settings see\n<span class=\"na\">:ref:</span><span class=\"nv\">`deprecated-settings`</span>.\n\nYou can find both in the :doc:`settings reference document\n<span class=\"nt\">&lt;/ref/settings&gt;</span>`.\n</code></pre></div>\n<p>We use the Sphinx <a class=\"reference external\" href=\"https://www.sphinx-doc.org/en/master/usage/referencing.html#role-doc\" title=\"(Sphinx v9.1.1에서)\"><code class=\"xref rst rst-role docutils literal notranslate\"><span class=\"pre\">doc</span></code></a> cross reference element when we want to\nlink to another document as a whole and the <a class=\"reference external\" href=\"https://www.sphinx-doc.org/en/master/usage/referencing.html#role-ref\" title=\"(Sphinx v9.1.1에서)\"><code class=\"xref rst rst-role docutils literal notranslate\"><span class=\"pre\">ref</span></code></a> element when\nwe want to link to an arbitrary location in a document.</p>\n</li>\n<li><p>Next, notice how the settings are annotated:</p>\n<div class=\"code-block\" data-language=\"rst\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Rst</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Rst code\"><code><span class=\"p\">..</span> <span class=\"ow\">setting</span><span class=\"p\">::</span> ADMINS\n\n<span class=\"gh\">ADMINS</span>\n<span class=\"gh\">======</span>\n\nDefault: <span class=\"s\">``[]``</span> (Empty list)\n\nA list of all the people who get code error notifications. When\n<span class=\"s\">``DEBUG=False``</span> and a view raises an exception, Django will email these people\nwith the full exception information. Each member of the list should be a tuple\nof (Full name, email address). Example<span class=\"se\">::</span>\n\n<span class=\"s\">    [(&#39;John&#39;, &#39;john@example.com&#39;), (&#39;Mary&#39;, &#39;mary@example.com&#39;)]</span>\n\nNote that Django will email <span class=\"ge\">*all*</span> of these people whenever an error happens.\nSee <span class=\"na\">:doc:</span><span class=\"nv\">`/howto/error-reporting`</span> for more information.\n</code></pre></div>\n<p>This marks up the following header as the “canonical” target for the\nsetting <code class=\"docutils literal notranslate\"><span class=\"pre\">ADMINS</span></code>. This means any time I talk about <code class=\"docutils literal notranslate\"><span class=\"pre\">ADMINS</span></code>,\nI can reference it using <code class=\"docutils literal notranslate\"><span class=\"pre\">:setting:`ADMINS`</span></code>.</p>\n</li>\n</ul>\n<p>That’s basically how everything fits together.</p>\n</section>\n<section id=\"spelling-check\">\n<span id=\"documentation-spelling-check\"></span><h2>Spelling check<a class=\"heading-anchor\" href=\"#spelling-check\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Before you commit your docs, it’s a good idea to run the spelling checker.\nYou’ll need to install a couple packages first:</p>\n<ul class=\"simple\">\n<li><p><a class=\"reference external\" href=\"https://pypi.org/project/pyenchant/\">pyenchant</a> (which requires\n<a class=\"reference external\" href=\"https://www.abisource.com/projects/enchant/\">enchant</a>)</p></li>\n<li><p><a class=\"reference external\" href=\"https://pypi.org/project/sphinxcontrib-spelling/\">sphinxcontrib-spelling</a></p></li>\n</ul>\n<p>Then from the <code class=\"docutils literal notranslate\"><span class=\"pre\">docs</span></code> directory, run <code class=\"docutils literal notranslate\"><span class=\"pre\">make</span> <span class=\"pre\">spelling</span></code>. Wrong words (if any)\nalong with the file and line number where they occur will be saved to\n<code class=\"docutils literal notranslate\"><span class=\"pre\">_build/spelling/output.txt</span></code>.</p>\n<p>If you encounter false-positives (error output that actually is correct), do\none of the following:</p>\n<ul class=\"simple\">\n<li><p>Surround inline code or brand/technology names with grave accents (`).</p></li>\n<li><p>Find synonyms that the spell checker recognizes.</p></li>\n<li><p>If, and only if, you are sure the word you are using is correct - add it\nto <code class=\"docutils literal notranslate\"><span class=\"pre\">docs/spelling_wordlist</span></code> (please keep the list in alphabetical order).</p></li>\n</ul>\n</section>\n<section id=\"translating-documentation\">\n<h2>Translating documentation<a class=\"heading-anchor\" href=\"#translating-documentation\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>See <a class=\"reference internal\" href=\"/ko/2.2/internals/contributing/localizing/#translating-documentation\"><span class=\"std std-ref\">Localizing the Django documentation</span></a> if\nyou’d like to help translate the documentation into another language.</p>\n</section>\n<section id=\"django-admin-man-page\">\n<span id=\"django-admin-manpage\"></span><h2><code class=\"docutils literal notranslate\"><span class=\"pre\">django-admin</span></code> man page<a class=\"heading-anchor\" href=\"#django-admin-man-page\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Sphinx can generate a manual page for the\n<a class=\"reference internal\" href=\"/ko/2.2/ref/django-admin/\"><span class=\"doc\">django-admin</span></a> command. This is configured in\n<code class=\"docutils literal notranslate\"><span class=\"pre\">docs/conf.py</span></code>. Unlike other documentation output, this man page should be\nincluded in the Django repository and the releases as\n<code class=\"docutils literal notranslate\"><span class=\"pre\">docs/man/django-admin.1</span></code>. There isn’t a need to update this file when\nupdating the documentation, as it’s updated once as part of the release process.</p>\n<p>To generate an updated version of the man page, run <code class=\"docutils literal notranslate\"><span class=\"pre\">make</span> <span class=\"pre\">man</span></code> in the\n<code class=\"docutils literal notranslate\"><span class=\"pre\">docs</span></code> directory. The new man page will be written in\n<code class=\"docutils literal notranslate\"><span class=\"pre\">docs/_build/man/django-admin.1</span></code>.</p>\n</section>","rootId":"writing-documentation","toc":[{"title":"문서 소스 얻기","anchor":"getting-the-raw-documentation","children":[]},{"title":"Sphinx 시작하기","anchor":"getting-started-with-sphinx","children":[]},{"title":"이 문서의 구조","anchor":"how-the-documentation-is-organized","children":[]},{"title":"문체","anchor":"writing-style","children":[]},{"title":"공통적인 용어","anchor":"commonly-used-terms","children":[]},{"title":"Django 관련 용어","anchor":"django-specific-terminology","children":[]},{"title":"reStructuredText 파일 안내","anchor":"guidelines-for-restructuredtext-files","children":[]},{"title":"Django-specific markup","anchor":"django-specific-markup","children":[]},{"title":"Documenting new features","anchor":"documenting-new-features","children":[]},{"title":"Minimizing images","anchor":"minimizing-images","children":[]},{"title":"예제:","anchor":"an-example","children":[]},{"title":"Spelling check","anchor":"spelling-check","children":[]},{"title":"Translating documentation","anchor":"translating-documentation","children":[]},{"title":"django-admin man page","anchor":"django-admin-man-page","children":[]}],"breadcrumbs":[{"docname":"internals/index","title":"Django internals","url":"/ko/2.2/internals/"},{"docname":"internals/contributing/index","title":"Contributing to Django","url":"/ko/2.2/internals/contributing/"}],"prev":{"docname":"internals/contributing/writing-code/javascript","title":"JavaScript","url":"/ko/2.2/internals/contributing/writing-code/javascript/"},"next":{"docname":"internals/contributing/localizing","title":"Localizing Django","url":"/ko/2.2/internals/contributing/localizing/"},"formats":{"html":"/ko/2.2/internals/contributing/writing-documentation/","markdown":"/ko/2.2/internals/contributing/writing-documentation.md","json":"/ko/2.2/internals/contributing/writing-documentation.json"},"source":"https://github.com/django/django/blob/stable/2.2.x/docs/internals/contributing/writing-documentation.txt","official":"https://docs.djangoproject.com/ko/2.2/internals/contributing/writing-documentation/","inVersions":["6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1","3.0","2.2","2.1","2.0","1.11"],"inLocales":["en","zh-hans","fr","ja","id","pt-br","ko","es","el","pl"]}