Commit 897b046
committed
Refine the set_attributes API
Renamed to set_attributes from update_attributes, because "update"
implies that we're hitting the db (because of the UPDATE SQL command).
Set is much better for local attribute modification. This also uses the
set_attribute function when instantiating the model, so that we don't
take kwargs in the constructor (this was confusing me in the docs; what
were those kwargs supposed to be for? Am I supposed to supply them
somehow?). I factored out a check_registration function and fixed a
buggy check in Model.__init__ to use that.1 parent 22b4de0 commit 897b046
3 files changed
+35
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
666 | 681 | | |
667 | 682 | | |
668 | 683 | | |
669 | 684 | | |
670 | 685 | | |
671 | 686 | | |
672 | 687 | | |
673 | | - | |
| 688 | + | |
674 | 689 | | |
675 | 690 | | |
676 | 691 | | |
| |||
875 | 890 | | |
876 | 891 | | |
877 | 892 | | |
878 | | - | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
879 | 899 | | |
880 | 900 | | |
881 | 901 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
226 | | - | |
| 225 | + | |
227 | 226 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | 227 | | |
232 | 228 | | |
233 | 229 | | |
234 | 230 | | |
235 | 231 | | |
236 | 232 | | |
237 | | - | |
238 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
239 | 238 | | |
240 | 239 | | |
241 | 240 | | |
242 | 241 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
249 | 247 | | |
250 | 248 | | |
251 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
0 commit comments