Use only the mysqlclient package to populate your admin site with MySQL database.
You can watch this tutorial also : https://youtu.be/SNyCV8vOr-g On Thu, Feb 3, 2022, 06:19 Richard Mayebo <[email protected]> wrote: > Platform: Observed on Ubuntu 20.04 > > > 1. Install MySQL (Observed on 5.7 and 8.0) > 2. Create a Virtual environment using venv, and activate it. > 3. Install Django 3.2.11 > 4. Install mysql-connector-python (Observed on 8.0.26 and 8.0.28) > 5. Install django-easy-audit and/or django-axes (both these third > party packages populate the Django Admin Site, where the apparent bug > manifests). > 6. Create a superuser (python manage.py createsuperuser) > 7. Start Django (python manage.py runserver) > 8. Launch the Django Admin Site and log in with the superuser. > 9. The pane on the left hand side will have links to objects created > by django-easy-audit and/or django-axes, depending on what was installed. > 10. Click on the "Request event" link under "Easy Audit Application" > or "Access logs" under "Axes" > 11. RESULT: > > Template error: In template > /home/......../.venv/lib/python3.8/site-packages/django/contrib/admin/templates/admin/base.html, > error at line 44 > > 'NoneType' object has no attribute 'day' [*OR 'NoneType' object has > no attribute 'month'*] > > This behaviour is observed on MySQL 5.7.37 and 8.0.26 using > my-sql-connector 8.0.26 and 8.0.28. > > Replacing MySQL with SQLite or PostgreSQL 12 solves the issue. > > Replacing the connector with mysqlclient-2.1.0 solves the issue. > > This implies there is a bug in the interaction between third-party > packages like django-easy-audit and django-axes, Django 3.2.11 and > my-sql-connector 8.0.26 and 8.0.28. > > Has similar behaviour been observed by anyone else? In any case, how can > this be brought to the attention of the development team? > > My apologies if this is the wrong forum for this post. I am new at this. > Regards, > Richard. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/0a483673-3393-42f9-87a1-c4463c583d7dn%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/0a483673-3393-42f9-87a1-c4463c583d7dn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAF7qQgCXChSXEoZsFHLK1gcCVh7pPdhiAqrOdmxOXdVdtYPinw%40mail.gmail.com.

