From 156a2138db20abc89933121e4ff2ee2ce56a173a Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Sat, 6 Jun 2020 14:34:38 -0400 Subject: Refs #30446 -- Removed unnecessary Value(..., output_field) in docs and tests. --- docs/ref/models/conditional-expressions.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'docs') 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') @@ -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') -- cgit v1.3