Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warnings after upgrading to django 3.2 #737

Closed
wesleyboar opened this issue Jun 12, 2023 · 1 comment · Fixed by #741
Closed

warnings after upgrading to django 3.2 #737

wesleyboar opened this issue Jun 12, 2023 · 1 comment · Fixed by #741

Comments

@wesleyboar
Copy link
Contributor

wesleyboar commented Jun 12, 2023

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.
@wesleyboar wesleyboar changed the title Warning After Upgrading to Django 3.2 warnings after upgrading to django 3.2 Jun 12, 2023
@yakky
Copy link
Member

yakky commented Jul 9, 2023

@wesleyboar thanks for the heads-up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants