mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Refs #34140 -- Corrected rst code-block and various formatting issues in docs.
This commit is contained in:
parent
c67ea79aa9
commit
ba755ca131
57 changed files with 443 additions and 269 deletions
|
@ -199,9 +199,10 @@ Imports
|
|||
|
||||
|
||||
class Example:
|
||||
# ...
|
||||
...
|
||||
|
||||
* Use convenience imports whenever available. For example, do this::
|
||||
* Use convenience imports whenever available. For example, do this
|
||||
::
|
||||
|
||||
from django.views import View
|
||||
|
||||
|
@ -236,12 +237,12 @@ View style
|
|||
Do this::
|
||||
|
||||
def my_view(request, foo):
|
||||
# ...
|
||||
...
|
||||
|
||||
Don't do this::
|
||||
|
||||
def my_view(req, foo):
|
||||
# ...
|
||||
...
|
||||
|
||||
Model style
|
||||
===========
|
||||
|
|
|
@ -207,6 +207,7 @@ You can also add a test for the deprecation warning::
|
|||
msg = 'Expected deprecation message'
|
||||
with self.assertWarnsMessage(RemovedInDjangoXXWarning, msg):
|
||||
# invoke deprecated behavior
|
||||
...
|
||||
|
||||
Finally, there are a couple of updates to Django's documentation to make:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue