Developing Django
in a nutshell

Presenter Notes

About me

Aymeric Augustin

Aymeric Augustin

@aymericaugustin

bitbucket.org/aaugustin

github.com/aaugustin

 

First steps with Django in August 2008

Contributor since January 2011

Core developer since October 2011

Presenter Notes

About me

Paris

Presenter Notes

Today's talk

 

How is Django developed?

 

 

How to contribute?

 

 

Learn by example

Presenter Notes

Part 1
How is Django developed?

Presenter Notes

Subversion

http://code.djangoproject.com/svn/django/trunk/

Presenter Notes

Trac

https://code.djangoproject.com/query?owner=~aaugustin&status=!closed&desc=1&order=id

Presenter Notes

Tickets

https://code.djangoproject.com/newticket

Presenter Notes

Ticket state

Triage stage

Unreviewed | Accepted | Ready for checkin
| Design Decision Needed | Someday/Maybe
| Fixed on a branch

Severity

Normal | Release blocker

Flags

☑ Has patch
☐ Needs documentation
☐ Needs tests
☐ Patch needs improvement

Presenter Notes

Ticket content

Type

Uncategorized | Bug | New feature | Cleanup/optimization

Component

contrib.admin | ... | Database layer (models, ORM) | ...

Version

SVN | 1.4 | 1.4-rc2 | 1.4-rc1 | 1.3.1 | ...

Flags

☑ Easy pickings
☑ UI/UX

Presenter Notes

Django Development Dashboard

http://dashboard.djangoproject.com/

Presenter Notes

Django Development Dashboard

http://dashboard.djangoproject.com/metric/new-tickets-week/

Presenter Notes

Django Development Dashboard

http://dashboard.djangoproject.com/metric/unreviewed/

Presenter Notes

Django Development Dashboard

http://dashboard.djangoproject.com/metric/ddn/

Presenter Notes

Django Development Dashboard

http://dashboard.djangoproject.com/metric/patches/

Presenter Notes

Django Development Dashboard

http://dashboard.djangoproject.com/metric/rfc/

Presenter Notes

Transifex

https://www.transifex.net/projects/p/django/language/it/

Presenter Notes

Continuous Integration

http://ci.djangoproject.com/

Presenter Notes

Communications

Mailing-lists

  • django-developers
  • django-i18n
  • django-updates
  • django-users

IRC channels

  • #django-dev
  • #django

Conferences and events

Presenter Notes

Part 2
How to contribute?

Presenter Notes

Obligatory link

All this — and much more — is explained in the docs!

Contributing to Django

Presenter Notes

Build up the community!

Help other developers

  • Answer questions on django-users and #django
  • Share what you learn on your blog

Extend the ecosystem

  • Contribute to open source Django projects
  • Release your own code as reusable apps, package them and upload them to PyPI

Aim for high quality

  • Enforce coding standards
  • Write good documentation

Presenter Notes

Work on Django itself

Report bugs

Everyone knows how to report a bug, right?

Triage tickets

Reduce the "Unreviewed tickets" count.

Write patches

With tests and docs. Or improve existing patches.

Review patches

Reduce the "Patches needing review" count.

Presenter Notes

Check out the code

Reference repository

$ svn checkout \
    https://code.djangoproject.com/svn/django/trunk

Official mirrors

$ git clone https://github.com/django/django.git
$ hg clone https://bitbucket.org/django/django

Pull requests must be referenced in a Trac ticket!

Presenter Notes

Work with patches

Creating a patch

$ svn di > $TICKETID.patch     # in the trunk dir
$ git diff > $TICKETID.patch

Applying a patch

$ wget https://code.djangoproject.com/attachment/\
  ticket/$TICKETID/$TICKETID.patch
$ patch -p0 < $TICKETID.patch  # -p1 for a git/hg diff
$ git apply $TICKETID.patch

If you're really serious, install djpatch.py:

$ djpatch.py $TICKETID

Presenter Notes

Current trends

Less code

  • Promote third-party apps
  • Deprecate some contrib apps
  • Remove debatable features

Thorough implementations

"If we do it in Django, let's do it right."

Test everything

"There aren't any tests" isn't an excuse :)

Presenter Notes

Part 3
Learn by example

Presenter Notes

A trivial ticket

#17674

Patch

Presenter Notes

An easy ticket

#17319

Patch 1

Patch 2

Patch 3

Presenter Notes

A medium ticket

#17675

Patch 1

Patch 2

Presenter Notes

A hard ticket

#3100

patch 1

...

patch 7

Presenter Notes

A very hard ticket

#2626

proposal


Interesting things

  • How are people going to use this feature?
  • What is the right level of abstraction?
  • What is going to break, and how badly?
  • How am I going to convince the core team?

Presenter Notes

Key learnings

Presenter Notes

Key learnings

  1. I'm not in your brain help me understand your problem quickly
  2. Written communication is hard don't be too smart
  3. Most people try to help only sometimes they fail
  4. Most code is written for a reason not always a good one
  5. Auto-fix is auto-break given a different set of expectations
  6. A known bug is bad a broken fix is worse

Presenter Notes

We're perfectionists
(with deadlines)

Presenter Notes

Questions?


Presenter Notes

Thank you

Presenter Notes