scirius icon indicating copy to clipboard operation
scirius copied to clipboard

ImportError: cannot import name get_real_ip

Open zixuanfe opened this issue 5 years ago • 2 comments

django-ipware the laster version module : get_real_ip not exist ; now is get_client_ip;

from ipware.ip import get_real_ip --- from ipware.ip import get_client_ip +++

please update requirements.txt or accounts/views.py ,thans

zixuanfe avatar Jul 09 '20 12:07 zixuanfe

Did you try the latest git master ?

pevma avatar Jul 14 '20 14:07 pevma

yes, The current version is master

root@debian:/opt/scirius# ls
accounts    git-sources  manage.py     npm		  postcss.config.js  rules    setup.py	tests
db.sqlite3  hunt	 MANIFEST.in   package.json	  README.rst	     scirius  static	viz
doc	    LICENSE	 node_modules  package-lock.json  requirements.txt   scss     suricata	webpack.config.js
root@debian:/opt/scirius# git branch
* master
root@debian:/opt/scirius# pip list |grep django-ipware
django-ipware              3.0.0    

That's how I changed it: accounts/views.py

from ipware.ip import get_client_ip as get_real_ip

then; python manager.py migrate and there was no error

you can try it ,Thank you for your reply

zixuanfe avatar Jul 15 '20 01:07 zixuanfe