StamusNetworks / scirius

Scirius is a web application for Suricata ruleset management and threat hunting.
GNU General Public License v3.0
635 stars 150 forks source link

ImportError: cannot import name get_real_ip #203

Open zixuanfe opened 4 years ago

zixuanfe commented 4 years ago

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 commented 4 years ago

Did you try the latest git master ?

zixuanfe commented 4 years ago

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