ImportError: No module named ‘django.core.urlresolvers’

I am working on Django project where I need to create a form for inputs. I tried to import reverse from django.core.urlresolvers. I got an error: line 2, in from django.core.urlresolvers import reverse ImportError: No module named ‘django.core.urlresolvers’ I am using Python 3.5.2, Django 2.0 and MySQL. 11 Answers 11

Python type hinting without cyclic imports

I’m trying to split my huge class into two; well, basically into the “main” class and a mixin with additional functions, like so: main.py file: import mymixin.py class Main(object, MyMixin): def func1(self, xxx): … mymixin.py file: class MyMixin(object): def func2(self: Main, xxx): # <— note the type hint … Now, while this works just fine, … Read more