Hello
I followed the steps using Django 2.2 and python 3.7 (i read it was not compatible but still wanted to give it a try),
And this is the herror that comes up:
TypeError: __init__() missing 1 required positional argument: 'on_delete'
After adding django-geoip with pip and adding it to INSTALLED_APPS at settings file.
I made a python manage.py migrate and this is what is thrown:
Traceback (most recent call last): File "manage.py", line 21, in <module> main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "/Users/bob/.virtualenvs/geo-vinyl/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line utility.execute() File "/Users/bobpiter/.virtualenvs/geo-vinyl/lib/python3.7/site-packages/django/core/management/__init__.py", line 357, in execute django.setup() File "/Users/bob/.virtualenvs/geo-vinyl/lib/python3.7/site-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/Users/bob/.virtualenvs/geo-vinyl/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate app_config.import_models() File "/Users/bob/.virtualenvs/geo-vinyl/lib/python3.7/site-packages/django/apps/config.py", line 211, in import_models self.models_module = import_module(models_module_name) File "/Users/bob/.virtualenvs/geo-vinyl/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/Users/bob/.virtualenvs/geo-vinyl/lib/python3.7/site-packages/django_geoip/models.py", line 33, in <module> class Region(models.Model): File "/Users/bob/.virtualenvs/geo-vinyl/lib/python3.7/site-packages/django_geoip/models.py", line 38, in Region country = models.ForeignKey(Country, related_name='regions') TypeError: __init__() missing 1 required positional argument: 'on_delete'
I dont know it it is in your plans to make it py3.7 compatible, thanks.
Hello
I followed the steps using Django 2.2 and python 3.7 (i read it was not compatible but still wanted to give it a try),
And this is the herror that comes up:
TypeError: __init__() missing 1 required positional argument: 'on_delete'After adding django-geoip with pip and adding it to INSTALLED_APPS at settings file.
I made a
python manage.py migrateand this is what is thrown:Traceback (most recent call last): File "manage.py", line 21, in <module> main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "/Users/bob/.virtualenvs/geo-vinyl/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line utility.execute() File "/Users/bobpiter/.virtualenvs/geo-vinyl/lib/python3.7/site-packages/django/core/management/__init__.py", line 357, in execute django.setup() File "/Users/bob/.virtualenvs/geo-vinyl/lib/python3.7/site-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/Users/bob/.virtualenvs/geo-vinyl/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate app_config.import_models() File "/Users/bob/.virtualenvs/geo-vinyl/lib/python3.7/site-packages/django/apps/config.py", line 211, in import_models self.models_module = import_module(models_module_name) File "/Users/bob/.virtualenvs/geo-vinyl/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/Users/bob/.virtualenvs/geo-vinyl/lib/python3.7/site-packages/django_geoip/models.py", line 33, in <module> class Region(models.Model): File "/Users/bob/.virtualenvs/geo-vinyl/lib/python3.7/site-packages/django_geoip/models.py", line 38, in Region country = models.ForeignKey(Country, related_name='regions') TypeError: __init__() missing 1 required positional argument: 'on_delete'I dont know it it is in your plans to make it py3.7 compatible, thanks.