| 29 | |
| 30 | ==== Store state on request, not view ==== |
| 31 | |
| 32 | Pass around the request object via method arguments, store arbitrary state on the request (perhaps in a blessed dictionary for that, or just in attributes). Document that state should be stored on the request, storing it on the view instance is unsafe, just like is already the case with ModelAdmin subclasses. |
| 33 | |
| 34 | Example usage and view would be the same as shown below in "__call__ and copy()". |
| 35 | |
| 36 | Arguments for: |
| 37 | * Avoids messy and non-idiomatic hacks. |
| 38 | * Avoids copying or creating new view instance on every request. |
| 39 | |
| 40 | Arguments against: |
| 41 | * Leaves some room for people to shoot themselves in the foot. |