Database migration issue

17 views
Skip to first unread message

Jin

unread,
Apr 12, 2020, 9:58:29 PM4/12/20
to Django users
Hi, everyone. 

I'm completely new to DRF and I structured my first project as the following.  When I run python manage.py makemigrations  script, it gives errors. I guess it's related to my folder structure but don't know exactly what's wrong with it.

Capture.PNG



Any help would be appreciated.

Thanks
  

wanbao jin

unread,
Apr 12, 2020, 10:53:34 PM4/12/20
to django...@googlegroups.com
When I just change the api.blogs.apps.BlogsConfig to api.blogs , it worked fine. I am curious why api.blogs.apps.BlogsConfig doesn't work .... 

wanbao jin

unread,
Apr 12, 2020, 11:21:12 PM4/12/20
to django...@googlegroups.com
Ok, I figure it out, When application configuration class is used in INSTALLED_APPS, the name field of AppConfig subclass should be the path of that application. 

AppConfig.name
Full Python path to the application, e.g. 'django.contrib.admin'.
This attribute defines which application the configuration applies to. It must be set in all AppConfig subclasses.
It must be unique across a Django project.

 😊
Reply all
Reply to author
Forward
0 new messages