# https://stackoverflow.com/a/11993818/126833
def save(self, *args, **kwargs):
print("self.id = ", self.id)
if not self.id:
# https://forum.djangoproject.com/t/slugify-with-multiple-fields/10919
self.slug = slugify(f"{self.title}-{self.company}")
super(Job, self).save(*args, **kwargs)
I want to store the slug with the id - self.slug = slugify(f"{self.title}-{self.company}-{self.id}")
- how do I get the ID when its just getting created and not yet available ?