Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No module named django.core.urlresovers in django 2.0a1

Tags:

django

Have recently upgraded from django 1.11.7 to django 2.0a1 and now cannot import reverse_lazy

 File "/home/silasi/Deprojecto/eljogo/jogos/views.py", line 8, in <module>
  from django.core.urlresolvers import reverse_lazy
 ModuleNotFoundError: No module named 'django.core.urlresolvers'
like image 266
Silasi Avatar asked Nov 03 '17 17:11

Silasi


1 Answers

In Django 2.0 you must import: from django.urls import reverse_lazy

like image 160
Diego Santa Cruz Mendezú Avatar answered Sep 22 '22 01:09

Diego Santa Cruz Mendezú