Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name get_real_ip #203

Open
zixuanfe opened this issue Jul 9, 2020 · 2 comments
Open

ImportError: cannot import name get_real_ip #203

zixuanfe opened this issue Jul 9, 2020 · 2 comments

Comments

@zixuanfe
Copy link

zixuanfe commented Jul 9, 2020

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

@pevma
Copy link
Member

pevma commented Jul 14, 2020

Did you try the latest git master ?

@zixuanfe
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants