I am wanting to send the user an email whenever a new primary key is generated in Django. My code in **Models.py:**

```
class PurchaseOrder(models.Model):
    product = models.CharField(max_length=256)
    vendor = models.CharField(max_length=256)
    dollar_amount = models.FloatField()
    item_number = models.AutoField(primary_key=True)

```

**I have it coded to where I can send an email every time my page is refreshed**

```
email = EmailMessage('Purchase Order System', 'your message here', to=['youremail@gmail.com'])
email.send()

```

**But how can I make it so that every time a new Primary key is generated, send an email?**