9👍
✅
Try to change name
in your category apps.py
like this
class CategoryConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'api.category'
3👍
AppConfig.name is a full python path to the application.
in your case your app category is inside another app called api so try to change your apps.py file to this :
class CategoryConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'api.category' // full path to your app category
the source from django documentation : https://docs.djangoproject.com/en/4.0/ref/applications/#django.apps.AppConfig.name
- [Django]-TinyMCE popups not loading when using S3 and setting document.domain
- [Django]-Django ModelChoiceField allow objects creation
- [Django]-Django ModelMultipleChoiceField queryset/filter for objects already associated
- [Django]-Postgres to Ubuntu Docker container linking not working
0👍
You will have to make api
directory a package by creating a __init__.py
file in it. Then instead of adding just api
in INSTALLED_APPS
list just add api.category
.
Like this –
INSTALLED_APPS = [
#other basic install
'corsheaders',
'rest_framework',
'rest_framework.authtoken',
'api.category',
]
- [Django]-Why does the Django Atom1Feed use atom:updated instead of atom:published?
- [Django]-Admin site uses default database in Django 1.6
Source:stackexchange.com