Community mailing list archives
Re: best way to generate a fieldby
The second one looks almost correct, but I don't know where did the "related_vals" came from. The line should read:
self.ean13 = barcode.get_barcode('ean13', code).get_fullcode()
"_compute_default_code" looks very incomplete. Also, you use the old API (style) for defining model fields.