Repository: treyhunner/django-email-log (language: python)

Issue:
Please define the `default_auto_field` in your apps.py
Since djago 3.2 it is required to configure the type of the auto generated id field of your models. Most people will usually just add a global DEFAULT_AUTO_FIELD setting. 

This is problematic because for projects that have a `DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'` a nasty migration will be generated that will convert the django-email-log id to `BigAutoField`. 

The solution is to just add default_auto_field = "django.db.models.AutoField" in your apps.py. I'll add a quick PR with with that fix exactly. 

Thank you




Discussion / hints:

Fix patch:
diff --git a/email_log/apps.py b/email_log/apps.py
index bef16a3..8cb300b 100644
--- a/email_log/apps.py
+++ b/email_log/apps.py
@@ -4,3 +4,4 @@
 class EmailLogConfig(AppConfig):
     name = 'email_log'
     verbose_name = "Email log"
+    default_auto_field = "django.db.models.AutoField"


Test patch:
diff --git a/email_log/tests/tests.py b/email_log/tests/tests.py
index 5243d98..6dd140a 100644
--- a/email_log/tests/tests.py
+++ b/email_log/tests/tests.py
@@ -1,3 +1,5 @@
+from django.apps import apps
+from django.core import checks
 from django.test import TestCase
 from django.test.utils import override_settings
 from django.contrib.auth.models import User
@@ -131,3 +133,10 @@ def test_delete_page(self):
     def test_app_name(self):
         page = self.client.get('/admin/')
         self.assertContains(page, "Email log")
+
+
+class ChecksTest(TestCase):
+    def test_not_raising_warning_W042_check(self):
+        warnings = checks.run_checks(app_configs=apps.get_app_configs())
+        warning_ids = [warning.id for warning in warnings]
+        self.assertNotIn('models.W042', warning_ids)