diff options
| author | Josh Smeaton <josh.smeaton@gmail.com> | 2015-03-17 11:38:55 +1100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-03-17 08:40:18 -0400 |
| commit | 88d798d71a20662bdf5335f0586fb9eb6e660c57 (patch) | |
| tree | 32ba9be2082b448fd5fa628d04cee6481142354e /docs/ref | |
| parent | ff2aa4019259947734c4791d6afc9f5405d901d0 (diff) | |
Refs #24485 -- Renamed some expression types
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/models/expressions.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt index 1722daa981..dfc852c048 100644 --- a/docs/ref/models/expressions.txt +++ b/docs/ref/models/expressions.txt @@ -280,9 +280,9 @@ should define the desired ``output_field``. For example, adding an arithmetic between different types, it's necessary to surround the expression in another expression:: - from django.db.models import DateTimeField, ExpressionNode, F + from django.db.models import DateTimeField, Expression, F - Race.objects.annotate(finish=ExpressionNode( + Race.objects.annotate(finish=Expression( F('start') + F('duration'), output_field=DateTimeField())) .. versionchanged:: 1.8 @@ -365,13 +365,13 @@ Expression API Query expressions implement the :ref:`query expression API <query-expression>`, but also expose a number of extra methods and attributes listed below. All -query expressions must inherit from ``ExpressionNode()`` or a relevant +query expressions must inherit from ``Expression()`` or a relevant subclass. When a query expression wraps another expression, it is responsible for calling the appropriate methods on the wrapped expression. -.. class:: ExpressionNode +.. class:: Expression .. attribute:: contains_aggregate @@ -485,9 +485,9 @@ We'll start by defining the template to be used for SQL generation and an ``__init__()`` method to set some attributes:: import copy - from django.db.models import ExpressionNode + from django.db.models import Expression - class Coalesce(ExpressionNode): + class Coalesce(Expression): template = 'COALESCE( %(expressions)s )' def __init__(self, expressions, output_field, **extra): |
