nephila / djangocms-blog

django CMS blog application - Support for multilingual posts, placeholders, social network meta tags and configurable apphooks
https://djangocms-blog.readthedocs.io
BSD 3-Clause "New" or "Revised" License
391 stars 192 forks source link

warnings after upgrading to django 3.2 #737

Closed wesleyboar closed 11 months ago

wesleyboar commented 1 year ago

Description

Many warnings, listed in console, about this repo, and its dependencies' models.

Steps to reproduce

  1. Have Docker.
  2. Clone https://github.com/TACC/tup-ui.
  3. Enter clone.
  4. Run npx nx build tup-cms (in terminal A).
  5. Run npx nx serve tup-cms (in terminal A).
  6. Run docker exec -it tup_cms /bin/bash (in terminal B).
  7. Run python manage.py migrate (in terminal B).
  8. See warnings in console.

I do not have a minimal reproducible environment.

Versions

After Upgrade Before Upgrade
Django = "^3.2"
django-cms = "^3.8.0"
python:3.8-buster
Django = "2.2.27"
django-cms = "3.7.4"
python:3.8-buster

Expected behaviour

No such wanrings.

Actual behaviour

Many warnings e.g.

djangocms_blog.BlogCategory: (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 BlogAppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
All Warnings ``` root@tup_cms:/code# python manage.py migrate System check identified some issues: WARNINGS: djangocms_blog.BlogCategory: (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 BlogAppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. djangocms_blog.BlogCategoryTranslation: (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 BlogAppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. djangocms_blog.BlogConfig: (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 BlogAppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. djangocms_blog.BlogConfigTranslation: (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 BlogAppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. djangocms_blog.Post: (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 BlogAppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. djangocms_blog.PostTranslation: (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 BlogAppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. djangocms_forms.Form: (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 DjangoCMSFormsConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. djangocms_forms.FormField: (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 DjangoCMSFormsConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. djangocms_forms.FormSubmission: (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 DjangoCMSFormsConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. djangocms_page_meta.GenericMetaAttribute: (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 PageMetaConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. djangocms_page_meta.PageMeta: (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 PageMetaConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. djangocms_page_meta.TitleMeta: (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 PageMetaConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. djangocms_snippet.Snippet: (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 SnippetConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. taggit.Tag: (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 TaggitAppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. taggit.TaggedItem: (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 TaggitAppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. ```

Additional information

  1. I think some of the warnings are about other apps (DjangoCMSForms, DjangoCMSFormsConfig).
  2. I accept there may be a way for me to remove these errors in my project, without change to the repos in question, but I want to make sure there is not some root problem before I attempt this.
yakky commented 12 months ago

@wesleyboar thanks for the heads-up