Jacob Kaplan-Moss

Tag: models

Django gotcha: concrete inheritance November 2nd, 2010

Since 1.0, Django’s supported model inheritance. It’s a neat feature, and can go a long way towards increasing flexibility in your modeling options. However, model inheritance also offers a really excellent opportunity to shoot yourself in the foot: concrete (multi-table) inheritance. If you’re using concrete inheritance, Django creates implicit joins back to the parent table on nearly every query. This can completely devastate your database’s performance. To refresh, if you’ve got models like:…

Three Feedback Models April 22nd, 2021

Here are three models that I like for delivering feedback. Each is valuable on its own and would make a great starting point for anyone who wants to build their feedback muscle. Together, they highlight some common factors in effective feedback models and show off a couple of “special features” that can help your feedback be particularly effective.