FAQ: Contributing code

How can I get started contributing code to Django?

Thanks for asking! We’ve written an entire document devoted to this question.It’s titled Contributing to Django.

I submitted a bug fix in the ticket system several weeks ago. Why are you ignoring my patch?

Don’t worry: We’re not ignoring you!

It’s important to understand there is a difference between “a ticket is beingignored” and “a ticket has not been attended to yet.” Django’s ticket systemcontains hundreds of open tickets, of various degrees of impact on end-userfunctionality, and Django’s developers have to review and prioritize.

On top of that: the people who work on Django are all volunteers. As a result,the amount of time that we have to work on the framework is limited and willvary from week to week depending on our spare time. If we’re busy, we may notbe able to spend as much time on Django as we might want.

The best way to make sure tickets do not get hung up on the way to checkin isto make it dead easy, even for someone who may not be intimately familiar withthat area of the code, to understand the problem and verify the fix:

  • Are there clear instructions on how to reproduce the bug? If thistouches a dependency (such as Pillow), a contrib module, or a specificdatabase, are those instructions clear enough even for someone notfamiliar with it?
  • If there are several patches attached to the ticket, is it clear whateach one does, which ones can be ignored and which matter?
  • Does the patch include a unit test? If not, is there a very clearexplanation why not? A test expresses succinctly what the problem is,and shows that the patch actually fixes it.If your patch stands no chance of inclusion in Django, we won’t ignore it –we’ll just close the ticket. So if your ticket is still open, it doesn’t meanwe’re ignoring you; it just means we haven’t had time to look at it yet.

When and how might I remind the team of a patch I care about?

A polite, well-timed message to the mailing list is one way to get attention.To determine the right time, you need to keep an eye on the schedule. If youpost your message right before a release deadline, you’re not likely to get thesort of attention you require.

Gentle IRC reminders can also work – again, strategically timed if possible.During a bug sprint would be a very good time, for example.

Another way to get traction is to pull several related tickets together. Whenthe someone sits down to review a bug in an area they haven’t touched fora while, it can take a few minutes to remember all the fine details of howthat area of code works. If you collect several minor bug fixes together intoa similarly themed group, you make an attractive target, as the cost of comingup to speed on an area of code can be spread over multiple tickets.

Please refrain from emailing anyone personally or repeatedly raising the sameissue over and over. This sort of behavior will not gain you any additionalattention – certainly not the attention that you need in order to get yourissue addressed.

But I’ve reminded you several times and you keep ignoring my patch!

Seriously - we’re not ignoring you. If your patch stands no chance ofinclusion in Django, we’ll close the ticket. For all the other tickets, weneed to prioritize our efforts, which means that some tickets will beaddressed before others.

One of the criteria that is used to prioritize bug fixes is the number ofpeople that will likely be affected by a given bug. Bugs that have thepotential to affect many people will generally get priority over those thatare edge cases.

Another reason that bugs might be ignored for while is if the bug is a symptomof a larger problem. While we can spend time writing, testing and applyinglots of little patches, sometimes the right solution is to rebuild. If arebuild or refactor of a particular component has been proposed or isunderway, you may find that bugs affecting that component will not get as muchattention. Again, this is a matter of prioritizing scarce resources. Byconcentrating on the rebuild, we can close all the little bugs at once, andhopefully prevent other little bugs from appearing in the future.

Whatever the reason, please keep in mind that while you may hit a particularbug regularly, it doesn’t necessarily follow that every single Django userwill hit the same bug. Different users use Django in different ways, stressingdifferent parts of the code under different conditions. When we evaluate therelative priorities, we are generally trying to consider the needs of theentire community, instead of prioritizing the impact on one particular user.This doesn’t mean that we think your problem is unimportant – just that in thelimited time we have available, we will always err on the side of making 10people happy rather than making a single person happy.