Trying to use this Invoice function of first app model (image below)
Here I am trying to use first app model Invoice function in second app (Image link below)
It show an Import Error (image below)
I am trying to use one app model function in other app model function but it show an ImportError.
Each Django App contains an __init__.py
file, registering them as a package. These "packages" can't import things from other files. To solve this, just put the view function in the same app as the model.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.