最新消息:

Django 1.9 提示RemovedInDjango110Warning: Support for string view arguments to url() is deprecated and will be removed in Django 1.10 (got django.contrib.auth.views.login).

Python 大步 1733浏览 0评论

 

在Django 1.9中使用url(),而用字符串作为其view参数,如下:

 

系统给出了警告:

RemovedInDjango110Warning: Support for string view arguments to url() is deprecated and will be removed in Django 1.10 (got django.contrib.auth.views.login).

 

意思是:url()使用字符串作为view参数的方式将在django 1.10后就会被移除,所以我们需要更改这种方式:

 

这样就没有提示了。

 

参考:《How to pass callable in Django 1.9

 

 

 

 

转载请注明:大步's Blog » Django 1.9 提示RemovedInDjango110Warning: Support for string view arguments to url() is deprecated and will be removed in Django 1.10 (got django.contrib.auth.views.login).

SiteMap