Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python r';的实际含义是什么每个URL中的图标?有人能详细解释他的意思和重要性吗_Python_Django_Database - Fatal编程技术网

Python r';的实际含义是什么每个URL中的图标?有人能详细解释他的意思和重要性吗

Python r';的实际含义是什么每个URL中的图标?有人能详细解释他的意思和重要性吗,python,django,database,Python,Django,Database,以下是相关代码: url(r'^dreamreals/', ListView.as_view(model = Dreamreal, template_name = "dreamreal_list.html")), ) url()路径是正则表达式。^字符将正则表达式锚定到字符串的开头。字符串文本的r前缀表示不解释反斜杠等(所谓的原始字符串) 在现代Django中,您可能希望使用而不是url()(现在称之为)。

以下是相关代码:

url(r'^dreamreals/', ListView.as_view(model = Dreamreal, 
  template_name = "dreamreal_list.html")),
)
url()
路径是正则表达式。
^
字符将正则表达式锚定到字符串的开头。字符串文本的
r
前缀表示不解释反斜杠等(所谓的原始字符串)

在现代Django中,您可能希望使用而不是
url()
(现在称之为
)。