Do not warn about unset AutoField key type

newer-dal
LEdoian 3 years ago
parent 41a0f29959
commit ab9e2cd9d1

@ -92,6 +92,8 @@ DATABASES = {
}
}
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' # This silences models.W042
# Password validation
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators

@ -34,6 +34,7 @@ class WishedItem(models.Model):
# FIXME: create more sensible name...
class DreamComeTrue(models.Model):
id = models.AutoField(primary_key=True)
item = models.ForeignKey(WishedItem, on_delete=models.CASCADE, help_text="What wish has been fulfilled.")
when = models.DateTimeField(auto_now_add=True, help_text="When the dream came true")
note = models.TextField(blank=True, help_text="Optional note, e.g. tracking number. Private, shown only to owner.")

Loading…
Cancel
Save