Added note about 'request' variable name to docs/contributing.txt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3688 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
22303d6c7d
commit
d9883e1dec
|
@ -168,6 +168,19 @@ Please follow these coding standards when writing code for inclusion in Django:
|
||||||
|
|
||||||
{{foo}}
|
{{foo}}
|
||||||
|
|
||||||
|
* In Django views, the first parameter in a view function should be called
|
||||||
|
``request``.
|
||||||
|
|
||||||
|
Do this::
|
||||||
|
|
||||||
|
def my_view(request, foo):
|
||||||
|
# ...
|
||||||
|
|
||||||
|
Don't do this::
|
||||||
|
|
||||||
|
def my_view(req, foo):
|
||||||
|
# ...
|
||||||
|
|
||||||
* Please don't put your name in the code. While we appreciate all
|
* Please don't put your name in the code. While we appreciate all
|
||||||
contributions to Django, our policy is not to publish individual
|
contributions to Django, our policy is not to publish individual
|
||||||
developer names in code -- for instance, at the top of Python modules.
|
developer names in code -- for instance, at the top of Python modules.
|
||||||
|
|
Loading…
Reference in New Issue