top | item 669697 Better Django models 3 points| mace | 16 years ago |ibm.com | reply 1 comment order hn newest [+] [-] bcater|16 years ago|reply Interesting that they use "type" as a field for the Format class:class Format(models.Model): type = models.CharField(choices=...type() is a Python function, so it doesn't make sense to use "type" as a field name. I found out the hard way that this causes bugs.
[+] [-] bcater|16 years ago|reply Interesting that they use "type" as a field for the Format class:class Format(models.Model): type = models.CharField(choices=...type() is a Python function, so it doesn't make sense to use "type" as a field name. I found out the hard way that this causes bugs.
[+] [-] bcater|16 years ago|reply
class Format(models.Model): type = models.CharField(choices=...
type() is a Python function, so it doesn't make sense to use "type" as a field name. I found out the hard way that this causes bugs.