I am trying to run a Django project, I tried to import assign_perm
and remove_perm
from guardian.shortcuts
(code listed here: from guardian.shortcuts import assign_perm, remove_perm
).
and got an error:
ModuleNotFoundError: No module named 'guardian.shortcuts'
I am using python3.8.9 and django2.0.7. I have already successfully tried install guardian(0.2.2) and Django-guardian(2.4.0), and I can import guardian successfully directly. Please help me to figure it out. THX!
P.S. I tried to print(guardian.__file__)
and the output is here:
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/guardian/__init__.py