What are your best practises for making your django application eas开发者_JS百科ily extendable for other developers?
What are your approaches for enabling other to overwrite your
- views
- forms
- templates
- models
- classes
In a way that enables a healthy environment for extensions to work well together?
- use signals and dispatchers
in your app create files.. -litseners.py -signals.py and then implement signals for your models and forms (views not so much)
use the django plugins pattern
ducktyping for your classes
Basically, what he says. But class based views in Django 1.3 will change this pretty much. See Alex Gaynor's talk for an in-depth analysis of what class based views will bring to reusable apps.
精彩评论