I realize this thread is 15 years old, but I actually ran into this issue the other day. I was running a custom migration with a RunPython function, where rather than typing:
my_model.message = '...' I accidentally wrote: my_model.mesage = '...' The migration ran successfully, so I ended up just losing all the data from the old column that I was trying to use to populate the new field with data and then drop. Thankfully this was just on my dev database, but it would have been nice if Django had been able to recognize that 'mesage' isn't a valid field name on the model and raise an error. This way the migration would have failed and the transaction would have been reverted, rather than committing without any of the data I was trying to save into the new column. Alex On Sunday, September 2, 2007 at 11:07:16 AM UTC-4 Jay Parlar wrote: > On 9/1/07, jorjun <jor...@gmail.com> wrote: > > But I disagree with __slots__ being justified purely for optimization > > purposes. > > Disagree all you want, but this is what Guido Van Rossum, creator of > Python and BDFL, had to say about it: > > "__slots__ is a terrible hack with nasty, hard-to-fathom side effects > that should only be used by programmers at grandmaster and wizard > levels. Unfortunately it has gained an enormous undeserved popularity > amongst the novices and apprentices, who should know better than to > use this magic incantation casually." > > Jay P. > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/efb36b01-2f79-448e-b8f1-d8eb1c8c12d9n%40googlegroups.com.