[Django]-Django create profile for user signal

5👍

✅

Replace

INSTALLED_APPS = [
   ...
   'users',
   ...
]

for

INSTALLED_APPS = [
   ...
   'users.apps.UsersConfig',
   ...
]

If you don’t specify the path for the app configuration class, Django will use the base one as mentioned in the docs https://docs.djangoproject.com/en/3.0/ref/applications/. So your configuration was not being used which caused the signal file to not be imported during app registry and by consequence the signals were not registered.

2👍

You can add app's config to either of two files.

  1. In your settings.py file’s INSTALLED_APPS, as mentioned above.

OR,

  1. In your related app‘s __init__.py file like this (in this example, the related app is users):
    default_app_config = 'users.apps.UsersConfig'

Leave a comment