{{{
class Extent3D(GeoAggregate):
def __init__(self, expression, **extra):
super().__init__(expression, output_field=ExtentField(), **extra)
}}}
From this comment
https://github.com/django/django/pull/7611/files#r131567089 `runtests.py`
needs to be adjusted, so it's possible to use a class-variable for the
output field instead.
--
Ticket URL: <https://code.djangoproject.com/ticket/28492>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Simon Charette (added)
* needs_better_patch: 0 => 1
* has_patch: 0 => 1
* stage: Unreviewed => Accepted
Comment:
Simon has a [https://github.com/django/django/pull/8872 PR] for this.
--
Ticket URL: <https://code.djangoproject.com/ticket/28492#comment:1>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"08654a99bbdd09049d682ae57cc94241534b29f0" 08654a99]:
{{{
#!CommitTicketReference repository=""
revision="08654a99bbdd09049d682ae57cc94241534b29f0"
Fixed #28492 -- Defined default output_field of expressions at the class
level.
This wasn't possible when settings were accessed during Field
initialization
time as our test suite setup script was triggering imports of expressions
before settings were configured.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28492#comment:3>
Comment (by Tim Graham <timograham@…>):
In [changeset:"13be45308045f522dfd1d0ff3da3cdc163bc521d" 13be4530]:
{{{
#!CommitTicketReference repository=""
revision="13be45308045f522dfd1d0ff3da3cdc163bc521d"
Refs #28492 -- Stopped accessing settings at Field.db_tablespace
initialization.
Deferring accesses to settings allows database fields to be initialized
before
settings are loaded.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28492#comment:2>
Comment (by Tim Graham <timograham@…>):
In [changeset:"f1b713024e3a1e8c6361ea407cb8248224f7cc82" f1b7130]:
{{{
#!CommitTicketReference repository=""
revision="f1b713024e3a1e8c6361ea407cb8248224f7cc82"
Refs #28492 -- Defined aggregates' output_field at the class level.
Missed in 08654a99bbdd09049d682ae57cc94241534b29f0.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28492#comment:4>
Comment (by Tim Graham <timograham@…>):
In [changeset:"deb3b58b362ef393b49702a3fef28774c9c3f53e" deb3b58b]:
{{{
#!CommitTicketReference repository=""
revision="deb3b58b362ef393b49702a3fef28774c9c3f53e"
[2.0.x] Refs #28492 -- Defined aggregates' output_field at the class
level.
Missed in 08654a99bbdd09049d682ae57cc94241534b29f0.
Backport of f1b713024e3a1e8c6361ea407cb8248224f7cc82 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28492#comment:5>