diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2024-01-26 12:45:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-26 12:45:07 +0100 |
| commit | 305757aec19c9d5111e4d76095ae0acd66163e4b (patch) | |
| tree | 04aa017e66c06b3b19cb466ed4e1d73cd871523d /docs/topics/conditional-view-processing.txt | |
| parent | 3f6d939c62efd967f548c27a265748cc2cc47ca5 (diff) | |
Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
Diffstat (limited to 'docs/topics/conditional-view-processing.txt')
| -rw-r--r-- | docs/topics/conditional-view-processing.txt | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/docs/topics/conditional-view-processing.txt b/docs/topics/conditional-view-processing.txt index 2447697de4..dfd36a64ae 100644 --- a/docs/topics/conditional-view-processing.txt +++ b/docs/topics/conditional-view-processing.txt @@ -72,8 +72,7 @@ Suppose you have this pair of models, representing a small blog system:: from django.db import models - class Blog(models.Model): - ... + class Blog(models.Model): ... class Entry(models.Model): @@ -96,8 +95,7 @@ for your front page view:: @condition(last_modified_func=latest_entry) - def front_page(request, blog_id): - ... + def front_page(request, blog_id): ... .. admonition:: Be careful with the order of decorators @@ -131,13 +129,11 @@ We could write the earlier example, which only uses a last-modified function, using one of these decorators:: @last_modified(latest_entry) - def front_page(request, blog_id): - ... + def front_page(request, blog_id): ... ...or:: - def front_page(request, blog_id): - ... + def front_page(request, blog_id): ... front_page = last_modified(latest_entry)(front_page) @@ -154,8 +150,7 @@ this would lead to incorrect behavior. # Bad code. Don't do this! @etag(etag_func) @last_modified(last_modified_func) - def my_view(request): - ... + def my_view(request): ... # End of bad code. |
