Environment:
Python3.6.5
Issues:
When I was using Django, there is an error appear:
‘dict’ object has no attribute ‘has_key’
Here is my code:
Reason:
There has_key() method has been deleted since python3.
Solution:
Modify:
if dict.has_key(key1):
to
if key1 in adict:
as following:
Done!