Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7c0f87383795ebbe514649b056eb6522 > files > 295

Django-doc-1.3.1-2.fc15.noarch.rpm


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>How to contribute to Django &mdash; Django v1.3.1 documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.3.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="Django v1.3.1 documentation" href="../index.html" />
    <link rel="up" title="“How-to” guides" href="index.html" />
    <link rel="next" title="Writing custom django-admin commands" href="custom-management-commands.html" />
    <link rel="prev" title="Authentication using REMOTE_USER" href="auth-remote-user.html" />
 
<script type="text/javascript" src="../templatebuiltins.js"></script>
<script type="text/javascript">
(function($) {
    if (!django_template_builtins) {
       // templatebuiltins.js missing, do nothing.
       return;
    }
    $(document).ready(function() {
        // Hyperlink Django template tags and filters
        var base = "../ref/templates/builtins.html";
        if (base == "#") {
            // Special case for builtins.html itself
            base = "";
        }
        // Tags are keywords, class '.k'
        $("div.highlight\\-html\\+django span.k").each(function(i, elem) {
             var tagname = $(elem).text();
             if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
                 var fragment = tagname.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
             }
        });
        // Filters are functions, class '.nf'
        $("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
             var filtername = $(elem).text();
             if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
                 var fragment = filtername.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
             }
        });
    });
})(jQuery);
</script>

  </head>
  <body>

    <div class="document">
  <div id="custom-doc" class="yui-t6">
    <div id="hd">
      <h1><a href="../index.html">Django v1.3.1 documentation</a></h1>
      <div id="global-nav">
        <a title="Home page" href="../index.html">Home</a>  |
        <a title="Table of contents" href="../contents.html">Table of contents</a>  |
        <a title="Global index" href="../genindex.html">Index</a>  |
        <a title="Module index" href="../py-modindex.html">Modules</a>
      </div>
      <div class="nav">
    &laquo; <a href="auth-remote-user.html" title="Authentication using &lt;tt class=&#34;docutils literal docutils literal docutils literal&#34;&gt;&lt;span class=&#34;pre&#34;&gt;REMOTE_USER&lt;/span&gt;&lt;/tt&gt;">previous</a> 
     |
    <a href="index.html" title="&amp;#8220;How-to&amp;#8221; guides" accesskey="U">up</a>
   |
    <a href="custom-management-commands.html" title="Writing custom django-admin commands">next</a> &raquo;</div>
    </div>
    
    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="howto-contribute">
            
  <div class="section" id="s-how-to-contribute-to-django">
<span id="how-to-contribute-to-django"></span><h1>How to contribute to Django<a class="headerlink" href="#how-to-contribute-to-django" title="Permalink to this headline">¶</a></h1>
<p>Django is developed 100% by the community, and the more people that are actively
involved in the code the better Django will be. We recognize that contributing
to Django can be daunting at first and sometimes confusing even to
veterans. While we have our official &#8220;Contributing to Django&#8221; documentation
which spells out the technical details of triaging tickets and submitting
patches, it leaves a lot of room for interpretation. This guide aims to offer
more general advice on issues such as how to interpret the various stages and
flags in Trac, and how new contributors can get started.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">This guide is meant to answer the most common questions about
contributing to Django, however it is no substitute for the
<a class="reference internal" href="../internals/contributing.html"><em>Contributing to Django</em></a> reference. Please make sure to
read that document to understand the specific details
involved in reporting issues and submitting patches.</p>
</div>
<div class="section" id="s-the-spirit-of-contributing">
<span id="s-id1"></span><span id="the-spirit-of-contributing"></span><span id="id1"></span><h2>&#8220;The Spirit of Contributing&#8221;<a class="headerlink" href="#the-spirit-of-contributing" title="Permalink to this headline">¶</a></h2>
<p>Django uses <a class="reference external" href="http://code.djangoproject.com/">Trac</a> for managing our progress, and Trac is a community-tended
garden of the bugs people have found and the features people would like to see
added. As in any garden, sometimes there are weeds to be pulled and sometimes
there are flowers and vegetables that need picking. We need your help to sort
out one from the other, and in the end we all benefit together.</p>
<p>Like all gardens, we can aspire to perfection but in reality there&#8217;s no such
thing. Even in the most pristine garden there are still snails and insects. In a
community garden there are also helpful people who&#8211;with the best of
intentions&#8211;fertilize the weeds and poison the roses. It&#8217;s the job of the
community as a whole to self-manage, keep the problems to a minimum, and educate
those coming into the community so that they can become valuable contributing
members.</p>
<p>Similarly, while we aim for Trac to be a perfect representation of the state of
Django&#8217;s progress, we acknowledge that this simply will not happen. By
distributing the load of Trac maintenance to the community, we accept that there
will be mistakes. Trac is &#8220;mostly accurate&#8221;, and we give allowances for the fact
that sometimes it will be wrong. That&#8217;s okay. We&#8217;re perfectionists with
deadlines.</p>
<p>We rely on the community to keep participating, keep tickets as accurate as
possible, and raise issues for discussion on our mailing lists when there is
confusion or disagreement.</p>
<p>Django is a community project, and every contribution helps. We can&#8217;t do this
without YOU!</p>
</div>
<div class="section" id="s-understanding-trac">
<span id="understanding-trac"></span><h2>Understanding Trac<a class="headerlink" href="#understanding-trac" title="Permalink to this headline">¶</a></h2>
<p>Trac is Django&#8217;s sole official issue tracker. All known bugs, desired features
and ideas for changes are logged there.</p>
<p>However, Trac can be quite confusing even to veteran contributors.  Having to
look at both flags and triage stages isn&#8217;t immediately obvious, and the stages
themselves can be misinterpreted.</p>
<div class="section" id="s-what-django-s-triage-stages-really-mean">
<span id="s-triage-stages-explained"></span><span id="what-django-s-triage-stages-really-mean"></span><span id="triage-stages-explained"></span><h3>What Django&#8217;s triage stages &#8220;really mean&#8221;<a class="headerlink" href="#what-django-s-triage-stages-really-mean" title="Permalink to this headline">¶</a></h3>
<div class="section" id="s-unreviewed">
<span id="unreviewed"></span><h4>Unreviewed<a class="headerlink" href="#unreviewed" title="Permalink to this headline">¶</a></h4>
<p>The ticket has not been reviewed by anyone who felt qualified to make a judgment
about whether the ticket contained a valid issue, a viable feature, or ought to
be closed for any of the various reasons.</p>
</div>
<div class="section" id="s-accepted">
<span id="accepted"></span><h4>Accepted<a class="headerlink" href="#accepted" title="Permalink to this headline">¶</a></h4>
<p>The big grey area! The absolute meaning of &#8220;accepted&#8221; is that the issue
described in the ticket is valid and is in some stage of being worked on. Beyond
that there are several considerations</p>
<ul>
<li><p class="first"><strong>Accepted + No Flags</strong></p>
<p>The ticket is valid, but no one has submitted a patch for it yet. Often this
means you could safely start writing a patch for it.</p>
</li>
<li><p class="first"><strong>Accepted + Has Patch</strong></p>
<p>The ticket is waiting for people to review the supplied patch. This means
downloading the patch and trying it out, verifying that it contains tests and
docs, running the test suite with the included patch, and leaving feedback on
the ticket.</p>
</li>
<li><p class="first"><strong>Accepted + Has Patch + (any other flag)</strong></p>
<p>This means the ticket has been reviewed, and has been found to need further
work. &#8220;Needs tests&#8221; and &#8220;Needs documentation&#8221; are self-explanatory. &#8220;Patch
needs improvement&#8221; will generally be accompanied by a comment on the ticket
explaining what is needed to improve the code.</p>
</li>
</ul>
</div>
<div class="section" id="s-design-decision-needed">
<span id="design-decision-needed"></span><h4>Design Decision Needed<a class="headerlink" href="#design-decision-needed" title="Permalink to this headline">¶</a></h4>
<p>This stage is for issues which may be contentious, may be backwards
incompatible, or otherwise involve high-level design decisions. These decisions
are generally made by the core committers, however that is not a
requirement. See the FAQ below for &#8220;My ticket has been in DDN forever!  What
should I do?&#8221;</p>
</div>
<div class="section" id="s-ready-for-checkin">
<span id="ready-for-checkin"></span><h4>Ready For Checkin<a class="headerlink" href="#ready-for-checkin" title="Permalink to this headline">¶</a></h4>
<p>The ticket was reviewed by any member of the community other than the person who
supplied the patch and found to meet all the requirements for a commit-ready
patch. A core committer now needs to give the patch a final review prior to
being committed. See the FAQ below for &#8220;My ticket has been in RFC forever!  What
should I do?&#8221;</p>
</div>
<div class="section" id="s-someday-maybe">
<span id="someday-maybe"></span><h4>Someday/Maybe?<a class="headerlink" href="#someday-maybe" title="Permalink to this headline">¶</a></h4>
<p>Generally only used for vague/high-level features or design ideas. These tickets
are uncommon and overall less useful since they don&#8217;t describe concrete
actionable issues.</p>
</div>
<div class="section" id="s-fixed-on-a-branch">
<span id="fixed-on-a-branch"></span><h4>Fixed on a branch<a class="headerlink" href="#fixed-on-a-branch" title="Permalink to this headline">¶</a></h4>
<p>Used to indicate that a ticket is resolved as part of a major body of work that
will eventually be merged to trunk.  Tickets in this stage generally don&#8217;t need
further work. This may happen in the case of major features/refactors in each
release cycle, or as part of the annual Google Summer of Code efforts.</p>
</div>
</div>
<div class="section" id="s-closing-tickets">
<span id="s-id2"></span><span id="closing-tickets"></span><span id="id2"></span><h3>Closing Tickets<a class="headerlink" href="#closing-tickets" title="Permalink to this headline">¶</a></h3>
<p>When a ticket has completed its useful lifecycle, it&#8217;s time for it to be closed.
Closing a ticket is a big responsibility, though. You have to be sure that
the issue is really resolved, and you need to keep in mind that the reporter
of the ticket may not be happy to have their ticket closed (unless it&#8217;s fixed,
of course). If you&#8217;re not certain about closing a ticket, just leave a comment
with your thoughts instead.</p>
<p>If you do close a ticket, you should always make sure of the following:</p>
<ul class="simple">
<li>Be certain that the issue is resolved.</li>
<li>Leave a comment explaining the decision to close the ticket.</li>
<li>If there is a way they can improve the ticket to reopen it, let them know.</li>
<li>If the ticket is a duplicate, reference the original ticket.</li>
<li><strong>Be polite.</strong> No one likes having their ticket closed. It can be
frustrating or even discouraging. The best way to avoid turning people
off from contributing to Django is to be polite and friendly and to offer
suggestions for how they could improve this ticket and other tickets in the
future.</li>
</ul>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">The <a class="reference internal" href="../internals/contributing.html#ticket-resolutions"><em>contributing reference</em></a> contains a
description of each of the available resolutions in Trac.</p>
</div>
</div>
<div class="section" id="s-example-trac-workflow">
<span id="example-trac-workflow"></span><h3>Example Trac workflow<a class="headerlink" href="#example-trac-workflow" title="Permalink to this headline">¶</a></h3>
<p>Here we see the life-cycle of an average ticket:</p>
<ul class="simple">
<li>Alice creates a ticket, and uploads an incomplete patch (no tests, incorrect
implementation).</li>
<li>Bob reviews the patch, marks it &#8220;Accepted&#8221;, &#8220;needs tests&#8221;, and &#8220;patch needs
improvement&#8221;, and leaves a comment telling Alice how the patch could be
improved.</li>
<li>Alice updates the patch, adding tests (but not changing the
implementation). She removes the two flags.</li>
<li>Charlie reviews the patch and resets the &#8220;patch needs improvement&#8221; flag with
another comment about improving the implementation.</li>
<li>Alice updates the patch, fixing the implementation. She removes the &#8220;patch
needs improvement&#8221; flag.</li>
<li>Daisy reviews the patch, and marks it RFC.</li>
<li>Jacob reviews the RFC patch, applies it to his checkout, and commits it.</li>
</ul>
<p>Some tickets require much less feedback than this, but then again some tickets
require much much more.</p>
</div>
</div>
<div class="section" id="s-advice-for-new-contributors">
<span id="advice-for-new-contributors"></span><h2>Advice for new contributors<a class="headerlink" href="#advice-for-new-contributors" title="Permalink to this headline">¶</a></h2>
<p>New contributor and not sure what to do? Want to help but just don&#8217;t know how to
get started? This is the section for you.</p>
<ul>
<li><p class="first"><strong>Pick a subject area that you care about, that you are familiar with, or that
you want to learn about.</strong></p>
<p>You don&#8217;t already have to be an expert on the area you want to work on; you
become an expert through your ongoing contributions to the code.</p>
</li>
<li><p class="first"><strong>Triage tickets.</strong></p>
<p>If a ticket is unreviewed and reports a bug, try and duplicate it.  If you can
duplicate it and it seems valid, make a note that you confirmed the bug and
accept the ticket. Make sure the ticket is filed under the correct component
area. Consider writing a patch that adds a test for the bug&#8217;s behavior, even
if you don&#8217;t fix the bug itself.</p>
</li>
<li><p class="first"><strong>Look for tickets that are accepted and review patches to build familiarity
with the codebase and the process.</strong></p>
<p>Mark the appropriate flags if a patch needs docs or tests. Look through the
changes a patch makes, and keep an eye out for syntax that is incompatible
with older but still supported versions of Python. Run the tests and make sure
they pass on your system.  Where possible and relevant, try them out on a
database other than SQLite. Leave comments and feedback!</p>
</li>
<li><p class="first"><strong>Keep old patches up to date.</strong></p>
<p>Oftentimes the codebase will change between a patch being submitted and the
time it gets reviewed. Make sure it still applies cleanly and functions as
expected. Simply updating a patch is both useful and important!</p>
</li>
<li><p class="first"><strong>Trac isn&#8217;t an absolute; the context is just as important as the words.</strong></p>
<p>When reading Trac, you need to take into account who says things, and when
they were said. Support for an idea two years ago doesn&#8217;t necessarily mean
that the idea will still have support. You also need to pay attention to who
<em>hasn&#8217;t</em> spoken &#8211; for example, if a core team member hasn&#8217;t been recently
involved in a discussion, then a ticket may not have the support required to
get into trunk.</p>
</li>
<li><p class="first"><strong>Start small.</strong></p>
<p>It&#8217;s easier to get feedback on a little issue than on a big one.</p>
</li>
<li><p class="first"><strong>If you&#8217;re going to engage in a big task, make sure that your idea has
support first.</strong></p>
<p>This means getting someone else to confirm that a bug is real before you fix
the issue, and ensuring that the core team supports a proposed feature before
you go implementing it.</p>
</li>
<li><p class="first"><strong>Be bold! Leave feedback!</strong></p>
<p>Sometimes it can be scary to put your opinion out to the world and say &#8220;this
ticket is correct&#8221; or &#8220;this patch needs work&#8221;, but it&#8217;s the only way the
project moves forward. The contributions of the broad Django community
ultimately have a much greater impact than that of the core developers. We
can&#8217;t do it without YOU!</p>
</li>
<li><p class="first"><strong>Err on the side of caution when marking things Ready For Check-in.</strong></p>
<p>If you&#8217;re really not certain if a ticket is ready, don&#8217;t mark it as
such. Leave a comment instead, letting others know your thoughts.  If you&#8217;re
mostly certain, but not completely certain, you might also try asking on IRC
to see if someone else can confirm your suspicions.</p>
</li>
<li><p class="first"><strong>Wait for feedback, and respond to feedback that you receive.</strong></p>
<p>Focus on one or two tickets, see them through from start to finish, and
repeat. The shotgun approach of taking on lots of tickets and letting some
fall by the wayside ends up doing more harm than good.</p>
</li>
<li><p class="first"><strong>Be rigorous.</strong></p>
<p>When we say &#8220;<span class="target" id="index-0"></span><a class="pep reference external" href="http://www.python.org/dev/peps/pep-0008"><strong>PEP 8</strong></a>, and must have docs and tests&#8221;, we mean it. If a patch
doesn&#8217;t have docs and tests, there had better be a good reason. Arguments like
&#8220;I couldn&#8217;t find any existing tests of this feature&#8221; don&#8217;t carry much
weight&#8211;while it may be true, that means you have the extra-important job of
writing the very first tests for that feature, not that you get a pass from
writing tests altogether.</p>
</li>
</ul>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The <a class="reference external" href="http://code.djangoproject.com/wiki/Reports">Reports page</a> contains links to many useful Trac queries, including
several that are useful for triaging tickets and reviewing patches as
suggested above.</p>
</div>
</div>
<div class="section" id="s-faqs">
<span id="faqs"></span><h2>FAQs<a class="headerlink" href="#faqs" title="Permalink to this headline">¶</a></h2>
<p><strong>This ticket I care about has been ignored for days/weeks/months! What can I do
to get it committed?</strong></p>
<ul class="simple">
<li>First off, it&#8217;s not personal. Django is entirely developed by volunteers (even
the core devs), and sometimes folks just don&#8217;t have time. The best thing to do
is to send a gentle reminder to the Django Developers mailing list asking for
review on the ticket, or to bring it up in the #django-dev IRC channel.</li>
</ul>
<p><strong>I&#8217;m sure my ticket is absolutely 100% perfect, can I mark it as RFC myself?</strong></p>
<ul class="simple">
<li>Short answer: No. It&#8217;s always better to get another set of eyes on a
ticket. If you&#8217;re having trouble getting that second set of eyes, see question
1, above.</li>
</ul>
<p><strong>My ticket has been in DDN forever! What should I do?</strong></p>
<ul class="simple">
<li>Design Decision Needed requires consensus about the right solution.  At the
very least it needs consensus among the core developers, and ideally it has
consensus from the community as well. The best way to accomplish this is to
start a thread on the Django Developers mailing list, and for very complex
issues to start a wiki page summarizing the problem and the possible
solutions.</li>
</ul>
</div>
</div>


          </div>         
        </div>
      </div>
      
        
          <div class="yui-b" id="sidebar">
            
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">How to contribute to Django</a><ul>
<li><a class="reference internal" href="#the-spirit-of-contributing">&#8220;The Spirit of Contributing&#8221;</a></li>
<li><a class="reference internal" href="#understanding-trac">Understanding Trac</a><ul>
<li><a class="reference internal" href="#what-django-s-triage-stages-really-mean">What Django&#8217;s triage stages &#8220;really mean&#8221;</a><ul>
<li><a class="reference internal" href="#unreviewed">Unreviewed</a></li>
<li><a class="reference internal" href="#accepted">Accepted</a></li>
<li><a class="reference internal" href="#design-decision-needed">Design Decision Needed</a></li>
<li><a class="reference internal" href="#ready-for-checkin">Ready For Checkin</a></li>
<li><a class="reference internal" href="#someday-maybe">Someday/Maybe?</a></li>
<li><a class="reference internal" href="#fixed-on-a-branch">Fixed on a branch</a></li>
</ul>
</li>
<li><a class="reference internal" href="#closing-tickets">Closing Tickets</a></li>
<li><a class="reference internal" href="#example-trac-workflow">Example Trac workflow</a></li>
</ul>
</li>
<li><a class="reference internal" href="#advice-for-new-contributors">Advice for new contributors</a></li>
<li><a class="reference internal" href="#faqs">FAQs</a></li>
</ul>
</li>
</ul>

  <h3>Browse</h3>
  <ul>
    
      <li>Prev: <a href="auth-remote-user.html">Authentication using <tt class="docutils literal docutils literal docutils literal"><span class="pre">REMOTE_USER</span></tt></a></li>
    
    
      <li>Next: <a href="custom-management-commands.html">Writing custom django-admin commands</a></li>
    
  </ul>
  <h3>You are here:</h3>
  <ul>
      <li>
        <a href="../index.html">Django v1.3.1 documentation</a>
        
          <ul><li><a href="index.html">&#8220;How-to&#8221; guides</a>
        
        <ul><li>How to contribute to Django</li></ul>
        </li></ul>
      </li>
  </ul>  

  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/howto/contribute.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
              <h3>Last update:</h3>
              <p class="topless">Sep 10, 2011</p>
          </div> 
        
      
    </div>
    
    <div id="ft">
      <div class="nav">
    &laquo; <a href="auth-remote-user.html" title="Authentication using &lt;tt class=&#34;docutils literal docutils literal docutils literal&#34;&gt;&lt;span class=&#34;pre&#34;&gt;REMOTE_USER&lt;/span&gt;&lt;/tt&gt;">previous</a> 
     |
    <a href="index.html" title="&amp;#8220;How-to&amp;#8221; guides" accesskey="U">up</a>
   |
    <a href="custom-management-commands.html" title="Writing custom django-admin commands">next</a> &raquo;</div>
    </div>
  </div>

      <div class="clearer"></div>
    </div>
  </body>
</html>