开发者

Django Apps extendability - How to make your django apps easily extendable?

开发者 https://www.devze.com 2023-01-22 18:23 出处:网络
What are your best practises for making your django application eas开发者_JS百科ily extendable for other developers?

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?


  1. 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)

  1. use the django plugins pattern

  2. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消