#30844: Add after_db_init() hook method to model
-------------------------------------+-------------------------------------
Reporter: Robert Singer | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by felixxm):
Adding a hook after each iteration doesn't sound like a good idea to me.
You need to take into account that we have different iterable classes e.g.
`ValuesIterable`, `ModelIterable`, `NamedValuesListIterable`, etc. and
that `Queryset ` is lazy, so you will not be able to add any useful hook
without forcing users to iterate through all rows. This looks quite niche
and I still cannot imagine any real use case based on a post iteration
hook. You can start a discussion on DevelopersMailingList if you don't
agree.
--
Ticket URL: <https://code.djangoproject.com/ticket/30844#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.25d5b53b069c607c136cfe662dae119c%40djangoproject.com.