NoReverseMatch Error

前端 未结 3 1008
感动是毒
感动是毒 2020-12-09 15:09

I keep getting this error for the django login system. Here is part of my urls.py:

     (r\'^contractManagement/login\', \'django.contrib.auth.views.login\'         


        
3条回答
  •  北荒
    北荒 (楼主)
    2020-12-09 15:32

    You don't show where you are trying to reverse this URL, but it looks like you have double-quoted it. If you're using the url tag, note that you don't need quotes around the url name:

    {% url django.contrib.auth.views.login %}
    

    not

    {% url 'django.contrib.auth.views.login' %}
    

提交回复
热议问题