Hi! I think I'm misunderstanding what you're asking for. I've looked at
every doc I can find on annotations to refresh my memory, and it looks like
annotations only apply to query sets, not to objects? Could you say a bit
more about your use case to help me grok what's going on?

Thanks,
Philip

PJJ
http://philipjohnjames.com


On Sat, Feb 23, 2019 at 12:08 PM Mike Brown <[email protected]> wrote:

> I have a situation where I need a signal for when a model object is fully
> instantiated.
>
> Currently, there are signals for pre_init and post_init. However, when
> post_init is fired,
> the object is not fully 'initialized' in the sense that annotations have
> not yet been added to the object.
>
>
> In django.db.models.query there is class ModelIterable(BaseIterable)
>
> In this class there is code to run a query and then apply annotations.
>
> Should there be a new signal added to Django that is fired after the
> annotations are complete and the object is fully instantiated?
>
> Maybe a signal called 'instantiation_complete'?
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/bc4516df-71da-429f-af80-7c98a60ab91f%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/bc4516df-71da-429f-af80-7c98a60ab91f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CACXM1yFDmDRP%3D2aRpgrzk4PvgPSGbBSMQh%3D0D7XTmRES%2BQ99Tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to