django.core.exceptions.ImproperlyConfigured: Cannot import ‘category’. Check that ‘api.category.apps.CategoryConfig.name’ is correct

  django, django-rest-framework, python

I am using 3.2 django, and rest framework . main project name is ECOM and api is app .Inside api there are multiple apps like category,migrations,order,payment,product,user. Now I want to inform ecom.settings about installed api. HOW I should do it ?

SETTING.PY OF ECOM :

INSTALLED_APPS = [
     #other basic install
    'corsheaders',
    'rest_framework',
    'rest_framework.authtoken',
    'api',
    'api.category',
]

but getting error.

My category apps.py file looks like

class CategoryConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'category'

GIT hub link is https://github.com/Jhaamlal/DJANGO_REACT

Source: Python Questions

One Reply to “django.core.exceptions.ImproperlyConfigured: Cannot import ‘category’. Check that ‘api.category.apps.CategoryConfig.name’ is correct”

LEAVE A COMMENT