and i want to use classes in models in A app. so i choose to use <from …member.models import User> and it show some errors. <from …member.models import User, ImportError: attempted relative import beyond top-level package>. so how can i import models from another app??? matters between approval app and member app.
Your “current directory” for a django project is not the directory in which your models.py resides. You should be able to just do from member.models import User
To clarify this - your “current directory” for imports in Django is your base directory. All imports are done relative to it - not whatever directory your code being executed currently resides in. It doesn’t matter where that import statement is located.