{"title":"对新贡献者的建议","version":"5.2","locale":"zh-hans","docname":"internals/contributing/new-contributors","url":"/zh-hans/5.2/internals/contributing/new-contributors/","canonical":"https://djangodocs.dev/zh-hans/5.2/internals/contributing/new-contributors/","summary":"新来的贡献者，不知道该怎么办？ 想要提供帮助但是不知道如何开始？ 那这就是为你准备的部分。 开始并运行起来！ 如果您是 Django 新的贡献者，那么 编写你的第一个 Django 贡献 教程将为您介绍这些工具和工作流程。 该页面包含有关您可以为 Django 做出贡献的更一般建议以及如何入手的信息。…","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-get-up-and-running admonition\">\n<p class=\"admonition-title\">开始并运行起来！</p>\n<p>如果您是 Django 新的贡献者，那么 <a class=\"reference internal\" href=\"/zh-hans/5.2/intro/contributing/\"><span class=\"doc\">编写你的第一个 Django 贡献</span></a> 教程将为您介绍这些工具和工作流程。</p>\n</aside>\n<p>该页面包含有关您可以为 Django 做出贡献的更一般建议以及如何入手的信息。</p>\n<p>如果你正在寻找关于代码贡献的细节参考，参见 <a class=\"reference internal\" href=\"/zh-hans/5.2/internals/contributing/writing-code/\"><span class=\"doc\">贡献代码</span></a> 文档。</p>\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<section id=\"triage-tickets\">\n<h3>分类工单<a class=\"heading-anchor\" href=\"#triage-tickets\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>如果一个 <a class=\"reference external\" href=\"https://code.djangoproject.com/query?status=!closed&amp;stage=Unreviewed\">未审查的工单</a> 报告了一个错误，请尝试验证并重现它。如果您可以重现它并且它似乎是有效的，写一条记录以表明你确认了该错误并接受该工单。确保该工单归档在正确的组件区域。即使你不去修复 bug 本身，你也可以写一个用于测试 bug 的行为的补丁。查看更多内容请点击 <a class=\"reference internal\" href=\"/zh-hans/5.2/internals/contributing/triaging-tickets/#how-can-i-help-with-triaging\"><span class=\"std std-ref\">我能帮你怎么做分类？</span></a></p>\n</section>\n<section id=\"review-patches-of-accepted-tickets\">\n<h3>审查已接受工单的补丁<a class=\"heading-anchor\" href=\"#review-patches-of-accepted-tickets\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>这将帮助你熟悉代码库和流程。如果补丁需要文档或测试，请标记适当的标志。查看补丁所做的更改，并留意与较旧但仍受支持的 Python 版本不兼容的语法。<a class=\"reference internal\" href=\"/zh-hans/5.2/internals/contributing/writing-code/unit-tests/\"><span class=\"doc\">运行测试</span></a> 并确保它们通过。在可能和相关的情况下，尝试在 SQLite 以外的数据库上运行它们。留下评论和反馈！</p>\n</section>\n<section id=\"keep-old-patches-up-to-date\">\n<h3>保持旧补丁的最新状态<a class=\"heading-anchor\" href=\"#keep-old-patches-up-to-date\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>通常情况下，代码库会在提交补丁和审阅补丁之间发生变化。确保它仍然干净地应用，并按预期运行。更新补丁既有用又重要！更多信息请参见代码 <a class=\"reference internal\" href=\"/zh-hans/5.2/internals/contributing/writing-code/submitting-patches/\"><span class=\"doc\">提交贡献</span></a> 。</p>\n</section>\n<section id=\"write-some-documentation\">\n<h3>写文档<a class=\"heading-anchor\" href=\"#write-some-documentation\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Django的文档很好，但它总是可以改进的。你发现打字错误了吗？你认为有什么需要澄清的吗？继续并建议一个文档修补程序！另请参阅指南 <a class=\"reference internal\" href=\"/zh-hans/5.2/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><a class=\"reference external\" href=\"https://code.djangoproject.com/wiki/Reports\">报告页</a> 包含了许多有用的 Trac 查询链接，包括一些像上面建议的那样对分类工单和审查补丁有用的链接。</p>\n</aside>\n</section>\n<section id=\"sign-the-contributor-license-agreement\">\n<h3>签署贡献者许可协议<a class=\"heading-anchor\" href=\"#sign-the-contributor-license-agreement\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\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</section>\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<section id=\"pick-a-subject-area\">\n<h3>选择一个主题领域<a class=\"heading-anchor\" href=\"#pick-a-subject-area\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>这应该是你关心的、熟悉的或想要学习的内容。你不必已经是你想从事领域的专家；通过持续对代码的贡献，你会成为专家。</p>\n</section>\n<section id=\"analyze-tickets-context-and-history\">\n<h3>分析工单的背景和历史<a class=\"heading-anchor\" href=\"#analyze-tickets-context-and-history\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Trac不是绝对的；上下文和名词一样重要。在阅读Trac时，你需要考虑到账户谁说了什么，什么时候说的。两年前对一个想法的支持并不意味着这个想法还会得到支持。您还需要注意哪些人没有发言--例如，如果一位有经验的贡献者最近没有参与讨论，那么这份工单可能就不需要Django支持。</p>\n</section>\n<section id=\"start-small\">\n<h3>从小处着手<a class=\"heading-anchor\" href=\"#start-small\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>在小问题上得到反馈比在大问题上得到反馈要容易得多。请参阅 <a class=\"reference external\" href=\"https://code.djangoproject.com/query?status=!closed&amp;easy=1\">easy pickings</a>。</p>\n</section>\n<section id=\"confirm-support-before-engaging-in-a-big-task\">\n<h3>在从事大任务之前确认支持<a class=\"heading-anchor\" href=\"#confirm-support-before-engaging-in-a-big-task\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>这意味着在您解决问题之前让其他人确认一个bug是真实的，并确保在您开始实现一个建议的特性之前有一个共识。</p>\n</section>\n<section id=\"be-bold-leave-feedback\">\n<h3>大胆一点！留下反馈！<a class=\"heading-anchor\" href=\"#be-bold-leave-feedback\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>有时候，把你的观点向全世界发表，说“这个工单是正确的”或者“这个补丁需要工作”，这可能会让人害怕，但这是项目向前推进的唯一途径。广泛的Django社区的贡献最终会比任何一个人的贡献产生更大的影响。没有**你**我们做不到！</p>\n</section>\n<section id=\"be-cautious-when-marking-things-ready-for-check-in\">\n<h3>在标记“准备检入”时要谨慎<a class=\"heading-anchor\" href=\"#be-cautious-when-marking-things-ready-for-check-in\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>如果你真的不确定某个工单是否准备好了，不要将其标记为准备就绪。相反，留下评论，让别人知道你的想法。如果你基本确定，但还不完全确定，你也可以尝试在 <a class=\"reference external\" href=\"https://chat.djangoproject.com\">Django Discord 服务器</a> 的 <code class=\"docutils literal notranslate\"><span class=\"pre\">#contributing-getting-started</span></code> 频道中询问，看看是否有人可以确认你的怀疑。</p>\n</section>\n<section id=\"wait-for-feedback-and-respond-to-feedback-that-you-receive\">\n<h3>等待反馈，并对收到的反馈做出回应<a class=\"heading-anchor\" href=\"#wait-for-feedback-and-respond-to-feedback-that-you-receive\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>专注于一两张工单，从头到尾看完，然后重复。短期途径接手很多工单，让一些工单在半路上掉下来，这样做的结果是弊大于利。</p>\n</section>\n<section id=\"be-rigorous\">\n<h3>严谨细致<a class=\"heading-anchor\" href=\"#be-rigorous\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>当我们说“<span class=\"target\" id=\"index-2\"></span><a class=\"pep reference external\" href=\"https://peps.python.org/pep-0008/\"><strong>PEP 8</strong></a>，并且必须有文档和测试”时，我们是认真的。如果一个补丁没有文档和测试，最好有一个充分的理由。诸如“我找不到该功能的任何现有测试”之类的论点没有多大分量。虽然这可能是真的，但这意味着你有一个额外重要的任务，即为该功能编写第一个测试，而不是完全免于编写测试。</p>\n</section>\n<section id=\"be-patient\">\n<h3>保持耐心<a class=\"heading-anchor\" href=\"#be-patient\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>您的工单或补丁可能无法立即得到快速审查，并非出于个人原因。有很多工单和拉取请求需要处理。</p>\n<p>保持你的补丁最新是很重要的。在你解决了所有的审查意见后，请查看 Trac 上的工单，确保 <em>需要测试</em>、<em>需要文档</em> 和 <em>补丁需要改进</em> 的标志都被取消选中。</p>\n<p>请记住，Django 的发布周期为八个月，因此您的补丁有足够的时间进行审查。</p>\n<p>最后，一个及时的提醒可能会有所帮助。请参考 <a class=\"reference internal\" href=\"/zh-hans/5.2/faq/contributing/#new-contributors-faq\"><span class=\"std std-ref\">贡献代码 FAQ</span></a> 来获取一些想法。</p>\n</section>\n</section>","rootId":"advice-for-new-contributors","toc":[{"title":"快速入门","anchor":"first-steps","children":[{"title":"分类工单","anchor":"triage-tickets","children":[]},{"title":"审查已接受工单的补丁","anchor":"review-patches-of-accepted-tickets","children":[]},{"title":"保持旧补丁的最新状态","anchor":"keep-old-patches-up-to-date","children":[]},{"title":"写文档","anchor":"write-some-documentation","children":[]},{"title":"签署贡献者许可协议","anchor":"sign-the-contributor-license-agreement","children":[]}]},{"title":"方针","anchor":"guidelines","children":[{"title":"选择一个主题领域","anchor":"pick-a-subject-area","children":[]},{"title":"分析工单的背景和历史","anchor":"analyze-tickets-context-and-history","children":[]},{"title":"从小处着手","anchor":"start-small","children":[]},{"title":"在从事大任务之前确认支持","anchor":"confirm-support-before-engaging-in-a-big-task","children":[]},{"title":"大胆一点！留下反馈！","anchor":"be-bold-leave-feedback","children":[]},{"title":"在标记“准备检入”时要谨慎","anchor":"be-cautious-when-marking-things-ready-for-check-in","children":[]},{"title":"等待反馈，并对收到的反馈做出回应","anchor":"wait-for-feedback-and-respond-to-feedback-that-you-receive","children":[]},{"title":"严谨细致","anchor":"be-rigorous","children":[]},{"title":"保持耐心","anchor":"be-patient","children":[]}]}],"breadcrumbs":[{"docname":"internals/index","title":"Django内部","url":"/zh-hans/5.2/internals/"},{"docname":"internals/contributing/index","title":"为 Django 做贡献","url":"/zh-hans/5.2/internals/contributing/"}],"prev":{"docname":"internals/contributing/index","title":"为 Django 做贡献","url":"/zh-hans/5.2/internals/contributing/"},"next":{"docname":"internals/contributing/writing-code/index","title":"贡献代码","url":"/zh-hans/5.2/internals/contributing/writing-code/"},"formats":{"html":"/zh-hans/5.2/internals/contributing/new-contributors/","markdown":"/zh-hans/5.2/internals/contributing/new-contributors.md","json":"/zh-hans/5.2/internals/contributing/new-contributors.json"},"source":"https://github.com/django/django/blob/stable/5.2.x/docs/internals/contributing/new-contributors.txt","official":"https://docs.djangoproject.com/zh-hans/5.2/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","sv","zh-hans","ga","fr","ja","id","it","pt-br","ko","es","el","pl"]}