LoganMeitz / votefinder

GNU General Public License v3.0
2 stars 2 forks source link

Warnings when starting server for local testing #11

Closed rjmagley closed 1 year ago

rjmagley commented 1 year ago

Lots of warnings in this vein pop up when starting a local environment for testing:

    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 suspect either something went weird with the migrations at some point, or a Django update changed how models are handled. The tables in the DB are all properly getting the proper id field added to them when migrations are made, so this isn't a big deal.

rjmagley commented 1 year ago

Creating a brand-new Django 4.2 project has this hanging out in settings.py:

# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

Setting this probably fixes the warnings.

rjmagley commented 1 year ago

I forgot when exactly I made this change, but the DEFAULT_AUTO_FIELD is in settings.py now, so that's done.