Let me explain.
- I made a folder Mainf in sc folder
sc folder is Startapp
2- So in Installed_app Settins I configure
3- in Mainf I got my Models to migrate
when I run python manage.py makemigrations send me this message.
django.core.exceptions.ImproperlyConfigured: Cannot import ‘Mainf’. Check that ‘sc.Mainf.apps.MainfConfig.name’ is correct.
Any help please
I’m not understanding your directory structure as you’re trying to describe it.
Typically, you start with a project directory. Then you have your apps within that project directory - including an app directory as the same name as the project.
For example, if you use
startproject myproject, you’ll have:
If you then make that outer
myproject your current directory, the
startapp command will make the app directory.
So if you do
startapp myapp, you end up with:
This is the common starting point as used by the default Django tools and shown in the tutorial.
Please clarify what the directory structure is that you have created. Also post your INSTALLED_APPS setting.
I’m sorry, I can’t quite read the screen images, but from what I think I can tell, you’ve got this Mainf directory inside another app directory.
Why are you trying to do it this way? Is there some reason for it?
If you’re not familiar with Django’s structure and how apps are configured and how the imports work, you’re going to encounter fewer issues if you stick with the standard directory layouts.
The startapp directory is sc.
Inside I got a directory Mainf