Tuesday, June 8, 2021

Defining apps.py name while upgrading from Django 2.X to 3.X


In my Django 2.X project, I had the following structure generated by default:

project_name
      ---> animal_app
                 ---> apps.py
                              name = "animal"
                 ---> zebra
                               ---> apps.py
                                           name = "zebra"

Note that zebra is sub-app of animal app, and name is attribute of it's app config.

Now, after upgrading to 3.X, I figured out that I needed to change name="zebra"  to name="animal.zebra"

I wanted to understand why this change is needed and what does it mean? From the docs and release note it is not much clearly stated for the sub-apps.

--
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 django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bfc0603e-a0e0-4b4b-9ce9-b1b41a9b268fn%40googlegroups.com.

No comments:

Post a Comment