Django Lessons Learned

Ian Lewis
BeProud Inc.


1. Logic should be broken into seperate apps

Even a lot of "simple" Django sites commonly have a dozen or more applications in INSTALLED_APPS
James Bennett
Django Release Manager

Reusable Apps

James Bennett
Django Release Manager

Reusable Apps

2. ... but avoid recursive dependencies.

3. Don't fight the framework...

Source: The Library of Congress

Use Django's Features

4. ...but work around parts if they don't work for you.

Source: bildungskatastrophe (Flickr)

Django Features we avoid

5. Don't fight the language.

Source: Alexander Shenkar (Flickr:alexander_shenkar)

Python Features

Not Pythonic

from com.example.mysite import MySuperClass

class MySuperClassFactory(object):
    def newInstance(self):
        return MySuperClass(self.m_myProperty)

    def getMyProperty(self):
        return self.m_myProperty

    def setMyProperty(self, val):
        self.m_myProperty = val

Write Pythonic Code

6. Make your app easy to get started.

Source: Grant Tarrant (Flickr:r_a_z_e)

Keeping it Simple

David Kramer
Software Engineer, Disqus

Small team of engineers - Which means writing tests and having a dead simple workflow.
David Kramer
Software Engineer, Disqus

Get Started

7. Use 3rd party modules where possible.

Source: escdotdot (Flickr)

8. ... but use Django 3rd party apps sparingly.

9. Contribute to the community.

Source: palewire (Flickr)

Contribute to the community.

Influence the community.