ImportError: No module named 'django.core.urlresolvers'

前端 未结 11 1478
孤街浪徒
孤街浪徒 2020-11-27 14:04

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:

11条回答
  •  囚心锁ツ
    2020-11-27 14:06

    You need replace all occurrences of:

    from django.core.urlresolvers import reverse

    to:

    from django.urls import reverse

    NOTE: The same apply to reverse_lazy

    in Pycharm Cmd+Shift+R for starting replacment in Path.

提交回复
热议问题