Re: AutoField & auto-incrementing

2020-02-12 Thread Bruckner de Villiers
Useful, thanks Mike. Bruckner de Villiers 083 625 1086 On 2020/02/12, 23:18, "Mike Dewhirst" wrote: On 12/02/2020 6:54 pm, Mike Dewhirst wrote: > def save(self, *args, **kwargs): > self._pre_save()# stuff to be computed pre-save > super().save(*args, **kwargs) >

Re: AutoField & auto-incrementing

2020-02-12 Thread Mike Dewhirst
On 12/02/2020 6:54 pm, Mike Dewhirst wrote: def save(self, *args, **kwargs):     self._pre_save()    # stuff to be computed pre-save     super().save(*args, **kwargs)     self._post_save()   # stuff to be done after the save Also of occasional value ... def save(self, *args, **kwargs):     wha

Re: AutoField & auto-incrementing

2020-02-12 Thread J. Guadalupe Chavez
El mar., 11 de febrero de 2020 4:27 p.m., Mike Dewhirst < mi...@dewhirst.com.au> escribió: > On 11/02/2020 7:06 pm, Bruckner de Villiers wrote: > > > > Jason, > > > > Thank you. I have changed the title of this mail. If I have read the > > 10 year old ticket 8576 correctly, it seems to be a DB r

Re: AutoField & auto-incrementing

2020-02-12 Thread Bruckner de Villiers
Thanks Mike - I have just become cleverer. Bruckner de Villiers 083 625 1086 On 2020/02/12, 09:55, "Mike Dewhirst" wrote: On 12/02/2020 6:11 pm, Bruckner de Villiers wrote: > Mike, > Clever. The save function seems to write a string of the id. So, self.formulation_no = "50-" + s

Re: AutoField & auto-incrementing

2020-02-11 Thread Mike Dewhirst
On 12/02/2020 6:11 pm, Bruckner de Villiers wrote: Mike, Clever. The save function seems to write a string of the id. So, self.formulation_no = "50-" + str(self.id) could also work? Fact is you can do anything you like. Instead of what I showed you could call any method you care to write ei

Re: AutoField & auto-incrementing

2020-02-11 Thread Bruckner de Villiers
Mike, Clever. The save function seems to write a string of the id. So, self.formulation_no = "50-" + str(self.id) could also work? Bruckner de Villiers +27 83 625 1086 On 2020/02/12, 00:27, "Mike Dewhirst" wrote: On 11/02/2020 7:06 pm, Bruckner de Villiers wrote: > > Jason,

Re: AutoField & auto-incrementing

2020-02-11 Thread Bruckner de Villiers
Jason, I cracked the uuid option – what an ugly ticket no.!!! - 0273051c-af54-4baf-91b9-651701d9020c Bruckner de Villiers 083 625 1086 From: Bruckner de Villiers Date: Tuesday, 11 February 2020 at 10:06 To: Subject: AutoField & auto-incrementing Jason, Thank you. I have cha

Re: AutoField & auto-incrementing

2020-02-11 Thread Mike Dewhirst
On 11/02/2020 7:06 pm, Bruckner de Villiers wrote: Jason, Thank you.  I have changed the title of this mail.  If I have read the 10 year old ticket 8576 correctly, it seems to be a DB restriction and I imagine that there are good reasons for this.  However, then I don’t understand the purpos

AutoField & auto-incrementing

2020-02-11 Thread Bruckner de Villiers
Jason, Thank you.  I have changed the title of this mail.  If I have read the 10 year old ticket 8576 correctly, it seems to be a DB restriction and I imagine that there are good reasons for this.  However, then I don’t understand the purpose of the AutoField given the restrictions and that the