Django modelformset is powerful!

I spent two days trying all kinds of non-sense trying to setup a form for entering the temperature profile steps. In the end, it turns out using modelformset is so easy! No need to setup extra form for each model. No need to keep tracking which form is initialized by which object.  Two lines take … Continue reading Django modelformset is powerful!

Don’t repeat yourself, unless with style.

Don’t repeat yourself (DRY) Every distinct concept and/or piece of data should live in one, and only one, place. Redundancy is bad. Normalization is good. The framework, within reason, should deduce as much as possible from as little as possible. In most occasions, repeating is a waste of energy and resources. When we do need to … Continue reading Don’t repeat yourself, unless with style.