Is mylist = []; mylist == [] really a thing for testing for an empty list? Seems very unpythonic.
My newbieish mistake was assuming (forgetting!) that NULLs aren't distinct/unique, so you can not enforce a nullable column unique and expect only a single NULL value. There is a way around it with conditional constraints ... but unique=True or unique_together is not it.
It's really an RDBMS thing, not a Django thing, but when Django abstracts away the RDBMS, one forgets.
My newbieish mistake was assuming (forgetting!) that NULLs aren't distinct/unique, so you can not enforce a nullable column unique and expect only a single NULL value. There is a way around it with conditional constraints ... but unique=True or unique_together is not it.
It's really an RDBMS thing, not a Django thing, but when Django abstracts away the RDBMS, one forgets.