{"title":"对新贡献者的建议","version":"2.1","locale":"zh-hans","docname":"internals/contributing/new-contributors","url":"/zh-hans/2.1/internals/contributing/new-contributors/","canonical":"https://djangodocs.dev/zh-hans/2.1/internals/contributing/new-contributors/","summary":"新来的贡献者，不知道该怎么办？ 想要提供帮助但是不知道如何开始？ 那这就是为你准备的部分。 基本工具和工作流程 如果您是 Django 新的贡献者，那么 :文档:`/intro/contributing` 教程将为您介绍这些工具和工作流程。 快速入门 Link to this heading # 从这些简单的任务开始，去发现…","html":"<h1>对新贡献者的建议<a class=\"heading-anchor\" href=\"#advice-for-new-contributors\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>新来的贡献者，不知道该怎么办？ 想要提供帮助但是不知道如何开始？ 那这就是为你准备的部分。</p>\n<aside class=\"admonition-basic-tools-and-workflow admonition\">\n<p class=\"admonition-title\">基本工具和工作流程</p>\n<p>如果您是 Django 新的贡献者，那么 <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">:文档:`/intro/contributing`</span></a> 教程将为您介绍这些工具和工作流程。</p>\n</aside>\n<section id=\"first-steps\">\n<h2>快速入门<a class=\"heading-anchor\" href=\"#first-steps\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>从这些简单的任务开始，去发现 Django 的开发过程。</p>\n<ul>\n<li><p><strong>签署贡献者许可协议</strong></p>\n<p>您编写的代码属于您或您的雇主。 如果您的贡献超过一至两行代码，则需要签署 <a class=\"reference external\" href=\"https://www.djangoproject.com/foundation/cla/\">CLA</a> 。 有关更详尽的解释，请参阅  <a class=\"reference external\" href=\"https://www.djangoproject.com/foundation/cla/faq/\">Contributor License Agreement FAQ</a>”。</p>\n</li>\n<li><p><strong>Triage tickets</strong></p>\n<p>If an <a class=\"reference external\" href=\"https://code.djangoproject.com/query?status=!closed&amp;stage=Unreviewed\">unreviewed ticket</a> reports a bug, try and reproduce it. If you\ncan reproduce it and it seems valid, make a note that you confirmed the bug\nand accept the ticket. Make sure the ticket is filed under the correct\ncomponent area. Consider writing a patch that adds a test for the bug's\nbehavior, even if you don't fix the bug itself. See more at\n<a class=\"reference internal\" href=\"/zh-hans/2.1/internals/contributing/triaging-tickets/#how-can-i-help-with-triaging\"><span class=\"std std-ref\">How can I help with triaging?</span></a></p>\n</li>\n<li><p><strong>Look for tickets that are accepted and review patches to build familiarity\nwith the codebase and the process</strong></p>\n<p>Mark the appropriate flags if a patch needs docs or tests. Look through the\nchanges a patch makes, and keep an eye out for syntax that is incompatible\nwith older but still supported versions of Python. <a class=\"reference internal\" href=\"/zh-hans/2.1/internals/contributing/writing-code/unit-tests/\"><span class=\"doc\">Run the tests</span></a> and make sure they pass.\nWhere possible and relevant, try them out on a database other than SQLite.\nLeave comments and feedback!</p>\n</li>\n<li><p><strong>更新旧的的修补程序</strong></p>\n<p>Oftentimes the codebase will change between a patch being submitted and the\ntime it gets reviewed. Make sure it still applies cleanly and functions as\nexpected. Simply updating a patch is both useful and important! See more on\n<a class=\"reference internal\" href=\"/zh-hans/2.1/internals/contributing/writing-code/submitting-patches/\"><span class=\"doc\">Submitting patches</span></a>.</p>\n</li>\n<li><p><strong>撰写一些文档</strong></p>\n<p>Django's documentation is great but it can always be improved. Did you find\na typo? Do you think that something should be clarified? Go ahead and\nsuggest a documentation patch! See also the guide on\n<a class=\"reference internal\" href=\"/zh-hans/2.1/internals/contributing/writing-documentation/\"><span class=\"doc\">编写文档</span></a>.</p>\n<aside class=\"admonition admonition-note\" role=\"note\">\n<p class=\"admonition-title\">Note</p>\n<p>The <a class=\"reference external\" href=\"https://code.djangoproject.com/wiki/Reports\">reports page</a> contains links to many useful Trac queries, including\nseveral that are useful for triaging tickets and reviewing patches as\nsuggested above.</p>\n</aside>\n</li>\n</ul>\n</section>\n<section id=\"guidelines\">\n<h2>方针<a class=\"heading-anchor\" href=\"#guidelines\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>作为大型项目的新手，很容易感到沮丧。 这里有一些建议可以使你在 Django 上的工作更加有用、 有收获。</p>\n<ul>\n<li><p><strong>选择一个您关心的，您熟悉的或您想了解的主题区</strong></p>\n<p>你不必已是你想要工作的领域的专家; 您将通过对代码的持续贡献成为专家。</p>\n</li>\n<li><p><strong>Analyze tickets' context and history</strong></p>\n<p>Trac isn't an absolute; the context is just as important as the words.\nWhen reading Trac, you need to take into account who says things, and when\nthey were said. Support for an idea two years ago doesn't necessarily mean\nthat the idea will still have support. You also need to pay attention to who\n<em>hasn't</em> spoken -- for example, if an experienced contributor hasn't been\nrecently involved in a discussion, then a ticket may not have the support\nrequired to get into Django.</p>\n</li>\n<li><p><strong>Start small</strong></p>\n<p>It's easier to get feedback on a little issue than on a big one. See the\n<a class=\"reference external\" href=\"https://code.djangoproject.com/query?status=!closed&amp;easy=1\">easy pickings</a>.</p>\n</li>\n<li><p><strong>If you're going to engage in a big task, make sure that your idea has\nsupport first</strong></p>\n<p>This means getting someone else to confirm that a bug is real before you fix\nthe issue, and ensuring that there's consensus on a proposed feature before\nyou go implementing it.</p>\n</li>\n<li><p><strong>Be bold! Leave feedback!</strong></p>\n<p>Sometimes it can be scary to put your opinion out to the world and say &quot;this\nticket is correct&quot; or &quot;this patch needs work&quot;, but it's the only way the\nproject moves forward. The contributions of the broad Django community\nultimately have a much greater impact than that of any one person. We can't\ndo it without <strong>you</strong>!</p>\n</li>\n<li><p><strong>Err on the side of caution when marking things Ready For Check-in</strong></p>\n<p>If you're really not certain if a ticket is ready, don't mark it as\nsuch. Leave a comment instead, letting others know your thoughts.  If you're\nmostly certain, but not completely certain, you might also try asking on IRC\nto see if someone else can confirm your suspicions.</p>\n</li>\n<li><p><strong>Wait for feedback, and respond to feedback that you receive</strong></p>\n<p>Focus on one or two tickets, see them through from start to finish, and\nrepeat. The shotgun approach of taking on lots of tickets and letting some\nfall by the wayside ends up doing more harm than good.</p>\n</li>\n<li><p><strong>Be rigorous</strong></p>\n<p>When we say &quot;<span class=\"target\" id=\"index-0\"></span><a class=\"pep reference external\" href=\"https://peps.python.org/pep-0008/\"><strong>PEP 8</strong></a>, and must have docs and tests&quot;, we mean it. If a patch\ndoesn't have docs and tests, there had better be a good reason. Arguments\nlike &quot;I couldn't find any existing tests of this feature&quot; don't carry much\nweight--while it may be true, that means you have the extra-important job of\nwriting the very first tests for that feature, not that you get a pass from\nwriting tests altogether.</p>\n</li>\n</ul>\n</section>\n<section id=\"faq\">\n<span id=\"new-contributors-faq\"></span><h2>FAQ<a class=\"heading-anchor\" href=\"#faq\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<ol class=\"arabic\">\n<li><p><strong>This ticket I care about has been ignored for days/weeks/months! What can\nI do to get it committed?</strong></p>\n<p>First off, it's not personal. Django is entirely developed by volunteers\n(except the Django fellow), and sometimes folks just don't have time. The\nbest thing to do is to send a gentle reminder to the <a class=\"reference internal\" href=\"/zh-hans/2.1/internals/mailing-lists/#django-developers-mailing-list\"><span class=\"std std-ref\">django-developers</span></a>\nmailing list asking for review on the ticket, or to bring it up in the\n#django-dev IRC channel.</p>\n</li>\n<li><p><strong>I'm sure my ticket is absolutely 100% perfect, can I mark it as RFC\nmyself?</strong></p>\n<p>Short answer: No. It's always better to get another set of eyes on a\nticket. If you're having trouble getting that second set of eyes, see\nquestion 1, above.</p>\n</li>\n</ol>\n</section>","rootId":"advice-for-new-contributors","toc":[{"title":"快速入门","anchor":"first-steps","children":[]},{"title":"方针","anchor":"guidelines","children":[]},{"title":"FAQ","anchor":"faq","children":[]}],"breadcrumbs":[{"docname":"internals/index","title":"Django internals","url":"/zh-hans/2.1/internals/"},{"docname":"internals/contributing/index","title":"建设 Django","url":"/zh-hans/2.1/internals/contributing/"}],"prev":{"docname":"internals/contributing/index","title":"建设 Django","url":"/zh-hans/2.1/internals/contributing/"},"next":{"docname":"internals/contributing/bugs-and-features","title":"报告问题和请求新功能","url":"/zh-hans/2.1/internals/contributing/bugs-and-features/"},"formats":{"html":"/zh-hans/2.1/internals/contributing/new-contributors/","markdown":"/zh-hans/2.1/internals/contributing/new-contributors.md","json":"/zh-hans/2.1/internals/contributing/new-contributors.json"},"source":"https://github.com/django/django/blob/stable/2.1.x/docs/internals/contributing/new-contributors.txt","official":"https://docs.djangoproject.com/zh-hans/2.1/internals/contributing/new-contributors/","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"],"inLocales":["en","zh-hans","fr","ja","id","pt-br","ko","es","el","pl"]}