mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
[1.10.x] Fixed #26021 -- Applied hanging indentation to docs.
Backport of 4a4d7f980e
from master
This commit is contained in:
parent
971adb9e9c
commit
521772ff07
21 changed files with 185 additions and 107 deletions
|
@ -106,11 +106,13 @@ options can be added in the :meth:`~BaseCommand.add_arguments` method like this:
|
|||
parser.add_argument('poll_id', nargs='+', type=int)
|
||||
|
||||
# Named (optional) arguments
|
||||
parser.add_argument('--delete',
|
||||
parser.add_argument(
|
||||
'--delete',
|
||||
action='store_true',
|
||||
dest='delete',
|
||||
default=False,
|
||||
help='Delete poll instead of closing it')
|
||||
help='Delete poll instead of closing it',
|
||||
)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
# ...
|
||||
|
|
|
@ -207,10 +207,12 @@ filtered out of error reports in a production environment (that is, where
|
|||
|
||||
@sensitive_post_parameters('pass_word', 'credit_card_number')
|
||||
def record_user_profile(request):
|
||||
UserProfile.create(user=request.user,
|
||||
password=request.POST['pass_word'],
|
||||
credit_card=request.POST['credit_card_number'],
|
||||
name=request.POST['name'])
|
||||
UserProfile.create(
|
||||
user=request.user,
|
||||
password=request.POST['pass_word'],
|
||||
credit_card=request.POST['credit_card_number'],
|
||||
name=request.POST['name'],
|
||||
)
|
||||
...
|
||||
|
||||
In the above example, the values for the ``pass_word`` and
|
||||
|
|
|
@ -104,9 +104,9 @@ Here's how this might look in a fabfile::
|
|||
def deploy_static():
|
||||
local('./manage.py collectstatic')
|
||||
project.rsync_project(
|
||||
remote_dir = env.remote_static_root,
|
||||
local_dir = env.local_static_root,
|
||||
delete = True
|
||||
remote_dir=env.remote_static_root,
|
||||
local_dir=env.local_static_root,
|
||||
delete=True,
|
||||
)
|
||||
|
||||
.. _staticfiles-from-cdn:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue