I am using Django 3.2, and Django 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 ?
settings.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'
Try to change name in your category apps.py like this
class CategoryConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'api.category'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With