{"title":"Escrevendo a documentação","version":"5.2","locale":"pt-br","docname":"internals/contributing/writing-documentation","url":"/pt-br/5.2/internals/contributing/writing-documentation/","canonical":"https://djangodocs.dev/pt-br/5.2/internals/contributing/writing-documentation/","summary":"We place high importance on the consistency and readability of documentation. After all, Django was created in a journalism environment! So we treat our…","html":"<h1>Escrevendo a documentação<a class=\"heading-anchor\" href=\"#writing-documentation\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>We place high importance on the consistency and readability of documentation.\nAfter all, Django was created in a journalism environment! So we treat our\ndocumentation like we treat our code: we aim to improve it as often as\npossible.</p>\n<p>Mudanças na documentação geralmente aparecem de duas formas:</p>\n<ul class=\"simple\">\n<li><p>Melhorias gerais: correção de ortografia, correções de erros e melhores explicações através de escrita clara e mais exemplos.</p></li>\n<li><p>Novas funcionalidades: documentação de funcionalidades que foram adicionadas ao framework desde a última release.</p></li>\n</ul>\n<p>Esta seção explica como os escritores podem construir suas mudanças na documentação de forma mais eficiente e menos suscetível a erros.</p>\n<section id=\"the-django-documentation-process\">\n<h2>The Django documentation process<a class=\"heading-anchor\" href=\"#the-django-documentation-process\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Though Django’s documentation is intended to be read as HTML at\n<a class=\"reference external\" href=\"https://docs.djangoproject.com/\">https://docs.djangoproject.com/</a>, we edit it as a collection of plain text files\nwritten in the reStructuredText markup language for maximum flexibility.</p>\n<p>We work from the development version of the repository because it has the\nlatest-and-greatest documentation, just as it has the latest-and-greatest code.</p>\n<p>We also backport documentation fixes and improvements, at the discretion of the\nmerger, to the last release branch. This is because it’s advantageous to\nhave the docs for the last release be up-to-date and correct (see\n<a class=\"reference internal\" href=\"/pt-br/5.2/intro/whatsnext/#differences-between-doc-versions\"><span class=\"std std-ref\">Diferenças entre versões</span></a>).</p>\n<p>A documentação do Django usa o sistema de documentação <a class=\"reference external\" href=\"https://www.sphinx-doc.org/\">Sphinx</a>, que por sua vez é baseado no <a class=\"reference external\" href=\"https://docutils.sourceforge.io/\">docutils</a>. A ideia básica é que uma documentação em texto plano com formatação simples é transformada em HTML, PDF, e muitos outros formatos.</p>\n<p>Sphinx includes a <code class=\"docutils literal notranslate\"><span class=\"pre\">sphinx-build</span></code> command for turning reStructuredText into\nother formats, e.g., HTML and PDF. This command is configurable, but the Django\ndocumentation includes a <code class=\"docutils literal notranslate\"><span class=\"pre\">Makefile</span></code> that provides a shorter <code class=\"docutils literal notranslate\"><span class=\"pre\">make</span> <span class=\"pre\">html</span></code>\ncommand.</p>\n</section>\n<section id=\"how-the-documentation-is-organized\">\n<h2>Como a documentação é organizada<a class=\"heading-anchor\" href=\"#how-the-documentation-is-organized\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>A documentação é organizada em vários categorias:</p>\n<ul>\n<li><p><a class=\"reference internal\" href=\"/pt-br/5.2/intro/\"><span class=\"doc\">Tutorials</span></a> pega o leitor pelas mãos e o leva através de uma série de passos para criar algo.</p>\n<p>O importante em um tutorial é ajudar o leitor a fazer algo útil, preferencialmente o mais rápido possível, para que ele passe a ganhar confiança.</p>\n<p>Explain the nature of the problem we’re solving, so that the reader\nunderstands what we’re trying to achieve. Don’t feel that you need to begin\nwith explanations of how things work - what matters is what the reader does,\nnot what you explain. It can be helpful to refer back to what you’ve done and\nexplain afterward.</p>\n</li>\n<li><p><a class=\"reference internal\" href=\"/pt-br/5.2/topics/\"><span class=\"doc\">Topic guides</span></a> buscam explicar um conceito ou um assunto de modo bem abrangente.</p>\n<p>Faça links para referências ao invés de repeti-las. Utilize exemplos e não seja relutante em explicar coisas que pareçam muito básicas para você - essa pode ser a explicação que outra pessoa precisa.</p>\n<p>Contextualizar ajuda os novatos a ligar o assunto a coisas que eles já sabem.</p>\n</li>\n<li><p><a class=\"reference internal\" href=\"/pt-br/5.2/ref/\"><span class=\"doc\">Reference guides</span></a> contain technical references for APIs.\nThey describe the functioning of Django’s internal machinery and instruct in\nits use.</p>\n<p>Mantenha o material de referência focado estritamente no assunto. Assuma que o leitor já entende os conceitos básicos envolvidos mas precisa saber ou ser lembrado de como o Django faz isso.</p>\n<p>Guias de referência não são o local para explicações genéricas. Se você se encontrar explicando conceitos básicos, você deve querer mover o material para um guia em um assunto em específico.</p>\n</li>\n<li><p><a class=\"reference internal\" href=\"/pt-br/5.2/howto/\"><span class=\"doc\">How-to guides</span></a> são receitas que levam o leitor através de uma série de passos em assuntos chave.</p>\n<p>O que importa mais em um guia how-to é o que um usuário deseja alcançar. Um how-to deve sempre estar orientado a resultados ao invés de focado em detalhes internos de como o Django implementa o que quer que esteja sendo discutido.</p>\n<p>Esses guias são mais avançados que tutoriais e assumem algum conhecimento sobre como o Django trabalha. Assuma que o leitor seguiu os tutoriais e não hesite em enviar o leitor de volta para o tutorial apropriado ao invés de repetir o mesmo material.</p>\n</li>\n</ul>\n</section>\n<section id=\"how-to-start-contributing-documentation\">\n<h2>How to start contributing documentation<a class=\"heading-anchor\" href=\"#how-to-start-contributing-documentation\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<section id=\"clone-the-django-repository-to-your-local-machine\">\n<h3>Clone the Django repository to your local machine<a class=\"heading-anchor\" href=\"#clone-the-django-repository-to-your-local-machine\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>If you’d like to start contributing to our docs, get the development version of\nDjango from the source code repository (see\n<a class=\"reference internal\" href=\"/pt-br/5.2/topics/install/#installing-development-version\"><span class=\"std std-ref\">Instalando a versão de desenvolvimento.</span></a>):</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>git<span class=\"w\"> </span>clone<span class=\"w\"> </span>https://github.com/django/django.git\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> git clone https://github.com/django/django.git\n</code></pre></div></div></div>\n<p>If you’re planning to submit these changes, you might find it useful to make a\nfork of the Django repository and clone this fork instead.</p>\n</section>\n<section id=\"set-up-a-virtual-environment-and-install-dependencies\">\n<h3>Set up a virtual environment and install dependencies<a class=\"heading-anchor\" href=\"#set-up-a-virtual-environment-and-install-dependencies\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Create and activate a virtual environment, then install the dependencies:</p>\n<div class=\"code-block\" data-language=\"shell\"><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=\"w\"> </span>python<span class=\"w\"> </span>-m<span class=\"w\"> </span>venv<span class=\"w\"> </span>.venv\n$<span class=\"w\"> </span><span class=\"nb\">source</span><span class=\"w\"> </span>.venv/bin/activate\n$<span class=\"w\"> </span>python<span class=\"w\"> </span>-m<span class=\"w\"> </span>pip<span class=\"w\"> </span>install<span class=\"w\"> </span>-r<span class=\"w\"> </span>docs/requirements.txt\n</code></pre></div>\n</section>\n<section id=\"build-the-documentation-locally\">\n<h3>Build the documentation locally<a class=\"heading-anchor\" href=\"#build-the-documentation-locally\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>We can build HTML output from the <code class=\"docutils literal notranslate\"><span class=\"pre\">docs</span></code> directory:</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><span class=\"nb\">cd</span><span class=\"w\"> </span>docs\n<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> <span class=\"k\">cd</span> docs\n<span class=\"gp\">...\\&gt;</span> make.bat html\n</code></pre></div></div></div>\n<p>Your locally-built documentation will be accessible at\n<code class=\"docutils literal notranslate\"><span class=\"pre\">_build/html/index.html</span></code> and it can be viewed in any web browser, though it\nwill be themed differently than the documentation at\n<a class=\"reference external\" href=\"https://docs.djangoproject.com/\">docs.djangoproject.com</a>. This is OK! If\nyour changes look good on your local machine, they’ll look good on the website.</p>\n</section>\n<section id=\"making-edits-to-the-documentation\">\n<h3>Making edits to the documentation<a class=\"heading-anchor\" href=\"#making-edits-to-the-documentation\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>The source files are <code class=\"docutils literal notranslate\"><span class=\"pre\">.txt</span></code> files located in the <code class=\"docutils literal notranslate\"><span class=\"pre\">docs/</span></code> directory.</p>\n<p>These files are written in the reStructuredText markup language. To learn the\nmarkup, see the <a class=\"reference external\" href=\"https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html#rst-index\" title=\"(em Sphinx v9.1.1)\"><span class=\"xref std std-ref\">reStructuredText reference</span></a>.</p>\n<p>To edit this page, for example, we would edit the file\n<a class=\"extlink-source reference external\" href=\"https://github.com/django/django/blob/stable/5.2.x/docs/internals/contributing/writing-documentation.txt\">docs/internals/contributing/writing-documentation.txt</a> and rebuild the\nHTML with <code class=\"docutils literal notranslate\"><span class=\"pre\">make</span> <span class=\"pre\">html</span></code>.</p>\n</section>\n<section id=\"documentation-quality-checks\">\n<span id=\"documentation-checks\"></span><h3>Documentation quality checks<a class=\"heading-anchor\" href=\"#documentation-quality-checks\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Several checks help maintain Django’s documentation quality, including\n<a class=\"reference internal\" href=\"#documentation-spelling-check\"><span class=\"std std-ref\">spelling</span></a> and\n<a class=\"reference internal\" href=\"#documentation-code-block-format-check\"><span class=\"std std-ref\">code block formatting</span></a>.</p>\n<p>These checks are run automatically in CI and must pass before documentation\nchanges can be merged. They can also be run locally with a single command:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-2-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>check\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-2-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 check\n</code></pre></div></div></div>\n<p>This command runs all current checks and will include any new checks added in\nthe future.</p>\n<section id=\"spelling-check\">\n<span id=\"documentation-spelling-check\"></span><h4>Verificação ortográfica<a class=\"heading-anchor\" href=\"#spelling-check\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>Before you commit your docs, it’s a good idea to run the spelling checker.\nYou’ll need to install <a class=\"extlink-pypi reference external\" href=\"https://pypi.org/project/sphinxcontrib-spelling/\">sphinxcontrib-spelling</a> first. Then from the\n<code class=\"docutils literal notranslate\"><span class=\"pre\">docs</span></code> directory, run:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-3-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>spelling\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-3-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 spelling\n</code></pre></div></div></div>\n<p>Wrong words (if any) along with the file and line number where they occur will\nbe saved to <code class=\"docutils literal notranslate\"><span class=\"pre\">_build/spelling/output.txt</span></code>.</p>\n<p>Se você encontrar falso-positivos (erros que na verdade estão corretos), faça uma das coisas a seguir:</p>\n<ul class=\"simple\">\n<li><p>Surround inline code or brand/technology names with double grave accents\n(``).</p></li>\n<li><p>Encontre um sinônimo que o verificador ortográfico reconheça.</p></li>\n<li><p>Se, e somente se, você tiver certeza que a palavra que você está usando está correta - adicione ela em <code class=\"docutils literal notranslate\"><span class=\"pre\">docs/spelling_wordlist</span></code> (por favor mantenha a lista em ordem alfabética).</p></li>\n</ul>\n</section>\n<section id=\"code-block-format-check\">\n<span id=\"documentation-code-block-format-check\"></span><h4>Code block format check<a class=\"heading-anchor\" href=\"#code-block-format-check\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>All Python code blocks should be formatted using the <a class=\"extlink-pypi reference external\" href=\"https://pypi.org/project/blacken-docs/\">blacken-docs</a>\nauto-formatter. This is automatically run by the <a class=\"reference internal\" href=\"/pt-br/5.2/internals/contributing/writing-code/coding-style/#coding-style-pre-commit\"><span class=\"std std-ref\">pre-commit hook</span></a> if configured.</p>\n<p>The check can also be run manually: provided that <code class=\"docutils literal notranslate\"><span class=\"pre\">blacken-docs</span></code> is installed,\nrun the following command from the <code class=\"docutils literal notranslate\"><span class=\"pre\">docs</span></code> directory:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-4-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>black\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-4-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 black\n</code></pre></div></div></div>\n<p>The formatter will report any issues by printing them to the terminal and will\nreformat code blocks where possible.</p>\n</section>\n</section>\n<section id=\"link-check\">\n<span id=\"documentation-link-check\"></span><h3>Link check<a class=\"heading-anchor\" href=\"#link-check\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Links in documentation can become broken or changed such that they are no\nlonger the canonical link. Sphinx provides a builder that can check whether the\nlinks in the documentation are working. From the <code class=\"docutils literal notranslate\"><span class=\"pre\">docs</span></code> directory, run:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-5-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>linkcheck\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-5-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 linkcheck\n</code></pre></div></div></div>\n<p>Output is printed to the terminal, but can also be found in\n<code class=\"docutils literal notranslate\"><span class=\"pre\">_build/linkcheck/output.txt</span></code> and <code class=\"docutils literal notranslate\"><span class=\"pre\">_build/linkcheck/output.json</span></code>.</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">Aviso</p>\n<p>The execution of the command requires an internet connection and takes\nseveral minutes to complete, because the command tests all the links\nthat are found in the documentation.</p>\n</aside>\n<p>Entries that have a status of “working” are fine, those that are “unchecked” or\n“ignored” have been skipped because they either cannot be checked or have\nmatched ignore rules in the configuration.</p>\n<p>Entries that have a status of “broken” need to be fixed. Those that have a\nstatus of “redirected” may need to be updated to point to the canonical\nlocation, e.g. the scheme has changed <code class=\"docutils literal notranslate\"><span class=\"pre\">http://</span></code> → <code class=\"docutils literal notranslate\"><span class=\"pre\">https://</span></code>. In certain\ncases, we do not want to update a “redirected” link, e.g. a rewrite to always\npoint to the latest or stable version of the documentation, e.g. <code class=\"docutils literal notranslate\"><span class=\"pre\">/en/stable/</span></code> →\n<code class=\"docutils literal notranslate\"><span class=\"pre\">/en/3.2/</span></code>.</p>\n</section>\n</section>\n<section id=\"writing-style\">\n<h2>Estilo de escrita<a class=\"heading-anchor\" href=\"#writing-style\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>When using pronouns in reference to a hypothetical person, such as “a user with\na session cookie”, gender-neutral pronouns (they/their/them) should be used.\nInstead of:</p>\n<ul class=\"simple\">\n<li><p>ele ou ela… utilize eles.</p></li>\n<li><p>Dele ou dela… utilize deles.</p></li>\n<li><p>Dele ou dela… utilize deles.</p></li>\n<li><p>dele ou dela… use deles.</p></li>\n<li><p>ele mesmo ou ela mesma… use eles mesmos.</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>Termos usados com frequência<a class=\"heading-anchor\" href=\"#commonly-used-terms\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Aqui vão algumas orientações de estilo para termos usados comumente por toda a documentação:</p>\n<ul class=\"simple\">\n<li><p><strong>Django</strong> – quando estiver se referindo ao framework, deve começar com letra maiúscula. Ele só deve ser escrito em letras minúsculas no código Python e no logo de djangoproject.com.</p></li>\n<li><p><strong>email</strong> – sem hífen.</p></li>\n<li><p><strong>HTTP</strong> – the expected pronunciation is “Aitch Tee Tee Pee” and therefore\nshould be preceded by “an” and not “a”.</p></li>\n<li><p><strong>MySQL</strong>, <strong>PostgreSQL</strong>, <strong>SQLite</strong></p></li>\n<li><p><strong>SQL</strong> – quando estiver se referindo ao SQL, a pronunciação esperada deve ser “Ess Queue Ell” e não “sequel”. Portanto, em uma frase como “Retorna uma expressão SQL”, “SQL” deve ser precedido por “um” e não por “a”.</p></li>\n<li><p><strong>Python</strong> – quando estiver se referindo a linguagem, use letra maiúscula.</p></li>\n<li><p><strong>realize</strong>, <strong>customize</strong>, <strong>initialize</strong>, etc. – use o padrão Americano “ize” suffix, não “ise”</p></li>\n<li><p><strong>subclass</strong> – É uma única palavra sem o hífen, tanto para o verbo (“subclassear o modelo”) quanto para o substântivo (“criar uma subclasse”).</p></li>\n<li><p><strong>the web</strong>, <strong>web framework</strong> – it’s not capitalized.</p></li>\n<li><p><strong>website</strong> – utilize uma palavra, tudo em minúsculas.</p></li>\n</ul>\n</section>\n<section id=\"django-specific-terminology\">\n<h2>Terminologia específica do Django<a class=\"heading-anchor\" href=\"#django-specific-terminology\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<ul class=\"simple\">\n<li><p><strong>model</strong> – não tem maiúsculas.</p></li>\n<li><p><strong>template</strong> – não tem maiúsculas.</p></li>\n<li><p><strong>URLconf</strong> – utilize três as letras primeiras letras maiúsculas, sem espaço antes de “conf.”</p></li>\n<li><p><strong>view</strong> – não tem maiúsculas.</p></li>\n</ul>\n</section>\n<section id=\"guidelines-for-restructuredtext-files\">\n<h2>Orientações gerais para arquivos  reStructuredText<a class=\"heading-anchor\" href=\"#guidelines-for-restructuredtext-files\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Estas regras regulam o formato de nossa documentação em reST (reStructuredText):</p>\n<ul>\n<li><p>Na seção de títulos, só deixe em maiúsculas palavras iniciais e pronomes próprios.</p></li>\n<li><p>Restrinja a documentação em até 80 caracteres de comprimento, a não ser que o código de exemplo seja significativamente mais difícil de ler quando quebrado em duas linhas, ou por outra boa razão.</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=\"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>Add <span class=\"s\">``django.contrib.auth``</span> to your <span class=\"s\">``INSTALLED_APPS``</span>...\n</code></pre></div>\n<p>Isn’t nearly as helpful as:</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>Add <span class=\"na\">:mod:</span><span class=\"nv\">`django.contrib.auth`</span> to your <span class=\"na\">:setting:</span><span class=\"nv\">`INSTALLED_APPS`</span>...\n</code></pre></div>\n<p>Isso porque o Sphinx irá gerar links apropriados para o mais recente,  o que ajuda muito os leitores.</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 only the\n“last bit” of that path. So <code class=\"docutils literal notranslate\"><span class=\"pre\">:mod:`~django.contrib.auth`</span></code> will\ndisplay a link with the title “auth”.</p>\n</li>\n<li><p>Utilize <a class=\"reference external\" href=\"https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#module-sphinx.ext.intersphinx\" title=\"(em Sphinx v9.1.1)\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">intersphinx</span></code></a> para referenciar a documentação do Python e do Sphinx.</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 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>To improve readability, use <code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">admonition::</span> <span class=\"pre\">Descriptive</span> <span class=\"pre\">title</span></code> rather than\n<code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">note::</span></code>. Use these boxes sparingly.</p></li>\n<li><p>Use these heading styles:</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\">One</span>\n<span class=\"gh\">===</span>\n\n<span class=\"gh\">Two</span>\n<span class=\"gh\">===</span>\n\n<span class=\"gh\">Three</span>\n<span class=\"gh\">-----</span>\n\n<span class=\"gh\">Four</span>\n<span class=\"gh\">~~~~</span>\n\n<span class=\"gh\">Five</span>\n<span class=\"gh\">^^^^</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=\"(em Sphinx v9.1.1)\"><code class=\"xref rst rst-role docutils literal notranslate\"><span class=\"pre\">:rfc:</span></code></a> to reference a Request for Comments (RFC) and\ntry to link to the relevant section if possible. For example, use\n<code class=\"docutils literal notranslate\"><span class=\"pre\">:rfc:`2324#section-2.3.2`</span></code> or\n<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<li><p>Use <a class=\"reference external\" href=\"https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-pep\" title=\"(em Sphinx v9.1.1)\"><code class=\"xref rst rst-role docutils literal notranslate\"><span class=\"pre\">:pep:</span></code></a> to reference a Python Enhancement Proposal (PEP)\nand try to link to the relevant section if possible. For example, use\n<code class=\"docutils literal notranslate\"><span class=\"pre\">:pep:`20#easter-egg`</span></code> or <code class=\"docutils literal notranslate\"><span class=\"pre\">:pep:`Easter</span> <span class=\"pre\">Egg</span> <span class=\"pre\">&lt;20#easter-egg&gt;`</span></code>.</p></li>\n<li><p>Use <a class=\"reference external\" href=\"https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-mimetype\" title=\"(em Sphinx v9.1.1)\"><code class=\"xref rst rst-role docutils literal notranslate\"><span class=\"pre\">:mimetype:</span></code></a> to refer to a MIME Type unless the value\nis quoted for a code example.</p></li>\n<li><p>Use <a class=\"reference external\" href=\"https://www.sphinx-doc.org/en/master/usage/referencing.html#role-envvar\" title=\"(em Sphinx v9.1.1)\"><code class=\"xref rst rst-role docutils literal notranslate\"><span class=\"pre\">:envvar:</span></code></a> to refer to an environment variable. You may\nalso need to define a reference to the documentation for that environment\nvariable using <a class=\"reference external\" href=\"https://www.sphinx-doc.org/en/master/usage/domains/standard.html#directive-envvar\" title=\"(em Sphinx v9.1.1)\"><code class=\"xref rst rst-dir docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">envvar::</span></code></a>.</p></li>\n<li><p>Use <a class=\"reference external\" href=\"https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-cve\" title=\"(em Sphinx v9.1.1)\"><code class=\"xref rst rst-role docutils literal notranslate\"><span class=\"pre\">:cve:</span></code></a> to reference a Common Vulnerabilities and\nExposures (CVE) identifier. For example, use <code class=\"docutils literal notranslate\"><span class=\"pre\">:cve:`2019-14232`</span></code>.</p></li>\n</ul>\n</section>\n<section id=\"django-specific-markup\">\n<h2>Marcação específica do Django<a class=\"heading-anchor\" href=\"#django-specific-markup\"><span class=\"visually-hidden\">Link para este cabeçalho</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=\"(em 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=\"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> INSTALLED_APPS\n</code></pre></div>\n<p>Para redirecionar para uma configuração, utilize <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=\"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\">templatetag</span><span class=\"p\">::</span> regroup\n</code></pre></div>\n<p>Para redirecionar, utilize <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=\"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\">templatefilter</span><span class=\"p\">::</span> linebreaksbr\n</code></pre></div>\n<p>Para redirecionar, utilize <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=\"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\">fieldlookup</span><span class=\"p\">::</span> exact\n</code></pre></div>\n<p>Para link, utilize <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=\"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\">django-admin</span><span class=\"p\">::</span> migrate\n</code></pre></div>\n<p>Para linkar, utilize <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=\"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\">django-admin-option</span><span class=\"p\">::</span> --traceback\n</code></pre></div>\n<p>Para redirecionar, utilize <code class=\"docutils literal notranslate\"><span class=\"pre\">:option:`command_name</span> <span class=\"pre\">--traceback`</span></code> (ou omita <code class=\"docutils literal notranslate\"><span class=\"pre\">command_name</span></code> para as opções compartilhadas por todos os comandos como <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=\"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=\"na\">:ticket:</span><span class=\"nv\">`12345`</span>\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</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=\"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>use this command:\n\n<span class=\"p\">..</span> <span class=\"ow\">code-block</span><span class=\"p\">::</span> console\n\n    $ python manage.py shell\n</code></pre></div>\n<p>with this one:</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>use this command:\n\n<span class=\"p\">..</span> <span class=\"ow\">console</span><span class=\"p\">::</span>\n\n    $ python manage.py shell\n</code></pre></div>\n<p>Note duas coisas:</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>O segundo irá mostrar:</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>Documentando novas funcionalidades<a class=\"heading-anchor\" href=\"#documenting-new-features\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Nossa política para novas funcionalidades é:</p>\n<blockquote>\n<div><p>All documentation of new features should be written in a way that\nclearly designates the features that 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>Nossa forma preferida de marcar novas funcionalidades é adicionando um prefixo na documentação de novas funcionalidades com “<code class=\"docutils literal notranslate\"><span class=\"pre\">..</span> <span class=\"pre\">versionadded::</span> <span class=\"pre\">X.Y</span></code>”, seguidas de uma linha em branco mandatória e uma descrição opcional (identada).</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=\"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\">class</span><span class=\"p\">::</span> Author(first_name, last_name, middle_name=None)\n\n    A person who writes books.\n\n    <span class=\"s\">``first_name``</span> is ...\n\n<span class=\"c\">    ...</span>\n\n<span class=\"c\">    ``middle_name`` is ...</span>\n\n<span class=\"c\">    .. versionchanged:: A.B</span>\n\n<span class=\"c\">        The ``middle_name`` argument was added.</span>\n</code></pre></div>\n<p>Coloque as considerações referentes as mudanças anotadas no final das seções, não no topo.</p>\n<p>Além disso, evite mencionar uma versão específica do Django fora dos blocos <code class=\"docutils literal notranslate\"><span class=\"pre\">versionadded</span></code> ou <code class=\"docutils literal notranslate\"><span class=\"pre\">versionchanged</span></code>. Mesmo dentro de um bloco, Ainda costuma ser redundantes fazer isso já que essas anotações irão renderizar como “Novo no Django A.B” e “Alterado no Django A.B”, respectivamente.</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=\"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\">attribute</span><span class=\"p\">::</span> Author.middle_name\n\n<span class=\"p\">    ..</span> <span class=\"ow\">versionadded</span><span class=\"p\">::</span> A.B\n\n    An author&#39;s middle name.\n</code></pre></div>\n<p>We can 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 indentation\nchanges when the time comes.</p>\n</section>\n<section id=\"minimizing-images\">\n<h2>Minimizando imagens<a class=\"heading-anchor\" href=\"#minimizing-images\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Otimize a compressão das imagens quando possível. Para arquivos PNG, utilize OptiPNG e o “advpng” da AdvanceCOMP:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-6-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><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</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-6-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> <span class=\"k\">cd</span> docs\n<span class=\"gp\">...\\&gt;</span> optipng -o7 -zm1-9 -i0 -strip all `find . -type f -not -path <span class=\"s2\">&quot;.\\_build\\*&quot;</span> -name <span class=\"s2\">&quot;*.png&quot;</span>`\n<span class=\"gp\">...\\&gt;</span> advpng -z4 `find . -type f -not -path <span class=\"s2\">&quot;.\\_build\\*&quot;</span> -name <span class=\"s2\">&quot;*.png&quot;</span>`\n</code></pre></div></div></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>Um exemplo<a class=\"heading-anchor\" href=\"#an-example\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Para um rápido exemplo de como tudo se encaixa, considere este exemplo hipotético:</p>\n<ul>\n<li><p>Primeiro, o documento <code class=\"docutils literal notranslate\"><span class=\"pre\">ref/settings.txt</span></code> pode ter um leiaute geral como esse:</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>Depois, o documento <code class=\"docutils literal notranslate\"><span class=\"pre\">topics/settings.txt</span></code> pode ser algo assim:</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=\"(em 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=\"(em 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>Depois, repare em como os settings são anotados:</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\">    [(&quot;John&quot;, &quot;john@example.com&quot;), (&quot;Mary&quot;, &quot;mary@example.com&quot;)]</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>Isso marca o próximo cabeçalho como o alvo “canônico” para o setting <code class=\"docutils literal notranslate\"><span class=\"pre\">ADMINS</span></code>. Isto significa que sempre que eu falar sobre <code class=\"docutils literal notranslate\"><span class=\"pre\">ADMINS</span></code>, eu posso redirecionar para ele usando  <code class=\"docutils literal notranslate\"><span class=\"pre\">:setting:`ADMINS`</span></code>.</p>\n</li>\n</ul>\n<p>Isso é basicamente como tudo se encaixa.</p>\n</section>\n<section id=\"translating-documentation\">\n<h2>Traduzindo a documentação<a class=\"heading-anchor\" href=\"#translating-documentation\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Veja <a class=\"reference internal\" href=\"/pt-br/5.2/internals/contributing/localizing/#translating-documentation\"><span class=\"std std-ref\">Localizing the Django documentation</span></a> Se você quer ajudar a traduzir a documentação para outras linguagens.</p>\n</section>\n<section id=\"django-admin-man-page\">\n<span id=\"django-admin-manpage\"></span><h2>Página man do <code class=\"docutils literal notranslate\"><span class=\"pre\">django-admin</span></code><a class=\"heading-anchor\" href=\"#django-admin-man-page\"><span class=\"visually-hidden\">Link para este cabeçalho</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>O Sphinx pode gerar uma página de manual para o comando <a class=\"reference internal\" href=\"/pt-br/5.2/ref/django-admin/\"><span class=\"doc\">django-admin</span></a>. Isso é configurado em <code class=\"docutils literal notranslate\"><span class=\"pre\">docs/conf.py</span></code>. Diferentemente de outras documentações geradas, essa página man deve ser incluída no repositório do Django e de suas releases em <code class=\"docutils literal notranslate\"><span class=\"pre\">docs/man/django-admin.1</span></code>. Não existe a necessidade de atualizar esse arquivo quando estiver atualizando a documentação, já que ele é atualizado durante o processo de release.</p>\n<p>To generate an updated version of the man page, in the <code class=\"docutils literal notranslate\"><span class=\"pre\">docs</span></code> directory, run:</p>\n<div class=\"console\" data-console><div class=\"console-panel\" data-platform=\"unix\"><p class=\"console-label\" id=\"console-7-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>man\n</code></pre></div>\n</div><div class=\"console-panel\" data-platform=\"windows\"><p class=\"console-label\" id=\"console-7-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 man\n</code></pre></div></div></div>\n<p>The new man page will be written in <code class=\"docutils literal notranslate\"><span class=\"pre\">docs/_build/man/django-admin.1</span></code>.</p>\n</section>","rootId":"writing-documentation","toc":[{"title":"The Django documentation process","anchor":"the-django-documentation-process","children":[]},{"title":"Como a documentação é organizada","anchor":"how-the-documentation-is-organized","children":[]},{"title":"How to start contributing documentation","anchor":"how-to-start-contributing-documentation","children":[{"title":"Clone the Django repository to your local machine","anchor":"clone-the-django-repository-to-your-local-machine","children":[]},{"title":"Set up a virtual environment and install dependencies","anchor":"set-up-a-virtual-environment-and-install-dependencies","children":[]},{"title":"Build the documentation locally","anchor":"build-the-documentation-locally","children":[]},{"title":"Making edits to the documentation","anchor":"making-edits-to-the-documentation","children":[]},{"title":"Documentation quality checks","anchor":"documentation-quality-checks","children":[{"title":"Verificação ortográfica","anchor":"spelling-check","children":[]},{"title":"Code block format check","anchor":"code-block-format-check","children":[]}]},{"title":"Link check","anchor":"link-check","children":[]}]},{"title":"Estilo de escrita","anchor":"writing-style","children":[]},{"title":"Termos usados com frequência","anchor":"commonly-used-terms","children":[]},{"title":"Terminologia específica do Django","anchor":"django-specific-terminology","children":[]},{"title":"Orientações gerais para arquivos  reStructuredText","anchor":"guidelines-for-restructuredtext-files","children":[]},{"title":"Marcação específica do Django","anchor":"django-specific-markup","children":[]},{"title":"Documentando novas funcionalidades","anchor":"documenting-new-features","children":[]},{"title":"Minimizando imagens","anchor":"minimizing-images","children":[]},{"title":"Um exemplo","anchor":"an-example","children":[]},{"title":"Traduzindo a documentação","anchor":"translating-documentation","children":[]},{"title":"Página man do django-admin","anchor":"django-admin-man-page","children":[]}],"breadcrumbs":[{"docname":"internals/index","title":"Funcionamento interno do Projeto Django","url":"/pt-br/5.2/internals/"},{"docname":"internals/contributing/index","title":"Contribuindo com o Django","url":"/pt-br/5.2/internals/contributing/"}],"prev":{"docname":"internals/contributing/committing-code","title":"Enviando código","url":"/pt-br/5.2/internals/contributing/committing-code/"},"next":{"docname":"internals/contributing/localizing","title":"Localizando Django","url":"/pt-br/5.2/internals/contributing/localizing/"},"formats":{"html":"/pt-br/5.2/internals/contributing/writing-documentation/","markdown":"/pt-br/5.2/internals/contributing/writing-documentation.md","json":"/pt-br/5.2/internals/contributing/writing-documentation.json"},"source":"https://github.com/django/django/blob/stable/5.2.x/docs/internals/contributing/writing-documentation.txt","official":"https://docs.djangoproject.com/pt-br/5.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","1.10","1.9"],"inLocales":["en","sv","zh-hans","ga","fr","ja","id","it","pt-br","ko","es","el","pl"]}