Aleksi44 / wagtailsvg

Wagtail + SVG
https://pypi.org/project/wagtailsvg/
GNU General Public License v3.0
35 stars 24 forks source link

add apps.py to set the default_auto_field value for the app #12

Closed Ash-Crow closed 2 years ago

Ash-Crow commented 2 years ago

Currently, using this app with Django 3.2 issues the following warning every time a manage.py command (migrate, runserver...) is run :

WARNINGS:
wagtailsvg.Svg: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
    HINT: Configure the DEFAULT_AUTO_FIELD setting or the AppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.

I added the apps.py file with the default_auto_field to remove that warning.

It also solves issue https://github.com/Aleksi44/wagtailsvg/issues/9

Aleksi44 commented 2 years ago

Thanks @Ash-Crow