One thing that I allways collide is how to implement a master-detail application with Django. The tipical example is the Invoice and InvoiceLines.
The things to discuss are:
- how to structure code for saving, loading, etc. master and detail models
- views: files and templates, templates for detail lines, how to add dynamically
- autocalculated fields (like the total on parent row), where this code goes ?
Edit/Additions:
About autocalculated fields, here is my first solution, http://pastebin.com/ZGqNnHuC , would not it be better in the save method of model?
The master model needs values from detail models. (i.e. First it is needed to calculate totals on each detail, save each line, and then sum and save master) How it is made in a more Django way than calling calculate() method?