diff options
| author | Simon Charette <charette.s@gmail.com> | 2020-06-06 14:34:38 -0400 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-07-15 10:58:38 +0200 |
| commit | 156a2138db20abc89933121e4ff2ee2ce56a173a (patch) | |
| tree | 294047367a3c1d87d69b0cacac3504ffc892faa3 /docs/ref | |
| parent | 1e38f1191de21b6e96736f58df57dfb851a28c1f (diff) | |
Refs #30446 -- Removed unnecessary Value(..., output_field) in docs and tests.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/models/conditional-expressions.txt | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/docs/ref/models/conditional-expressions.txt b/docs/ref/models/conditional-expressions.txt index a1e2430ec1..546733dd8d 100644 --- a/docs/ref/models/conditional-expressions.txt +++ b/docs/ref/models/conditional-expressions.txt @@ -100,7 +100,7 @@ An example:: >>> >>> from datetime import date, timedelta - >>> from django.db.models import Case, CharField, Value, When + >>> from django.db.models import Case, Value, When >>> Client.objects.create( ... name='Jane Doe', ... account_type=Client.REGULAR, @@ -119,7 +119,6 @@ An example:: ... When(account_type=Client.GOLD, then=Value('5%')), ... When(account_type=Client.PLATINUM, then=Value('10%')), ... default=Value('0%'), - ... output_field=CharField(), ... ), ... ).values_list('name', 'discount') <QuerySet [('Jane Doe', '0%'), ('James Smith', '5%'), ('Jack Black', '10%')]> @@ -141,7 +140,6 @@ the ``Client`` has been with us, we could do so using lookups:: ... When(registered_on__lte=a_year_ago, then=Value('10%')), ... When(registered_on__lte=a_month_ago, then=Value('5%')), ... default=Value('0%'), - ... output_field=CharField(), ... ) ... ).values_list('name', 'discount') <QuerySet [('Jane Doe', '5%'), ('James Smith', '0%'), ('Jack Black', '10%')]> |
