瀏覽代碼

Fixed #26899 -- Documented why RawSQL params is a required parameter.

petedmarsh 8 年之前
父節點
當前提交
7bf3ba0d0c
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      docs/ref/models/expressions.txt

+ 3 - 1
docs/ref/models/expressions.txt

@@ -459,7 +459,9 @@ should avoid them if possible.
 
     You should be very careful to escape any parameters that the user can
     control by using ``params`` in order to protect against :ref:`SQL injection
-    attacks <sql-injection-protection>`.
+    attacks <sql-injection-protection>`. ``params`` is a required argument to
+    force you to acknowledge that you're not interpolating your SQL with user
+    provided data.
 
 .. currentmodule:: django.db.models