From 7082a99de0396f156fa139f4b6de2f5d2ee4ca70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Chojnacki?= Date: Tue, 6 Aug 2024 11:22:57 +0200 Subject: [PATCH] Add explicit id field to avoid creating migration with DEFAULT_AUTO_FIELD set to BigAutoField --- dbtemplates/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dbtemplates/models.py b/dbtemplates/models.py index 24945ab..9591bdd 100644 --- a/dbtemplates/models.py +++ b/dbtemplates/models.py @@ -19,6 +19,8 @@ class Template(models.Model): Defines a template model for use with the database template loader. The field ``name`` is the equivalent to the filename of a static template. """ + id = models.AutoField(primary_key=True, verbose_name=_('ID'), + serialize=False, auto_created=True) name = models.CharField(_('name'), max_length=100, help_text=_("Example: 'flatpages/default.html'")) content = models.TextField(_('content'), blank=True)