Custom field reference flowchart

12 views
Skip to first unread message

martin f krafft

unread,
Jan 12, 2016, 10:29:11 PM1/12/16
to django users list
Dear Django people,

I'm working on something I called "IndirectGenericForeignKey",¹ and
following suggestionsi I received on django-developers, I've made
a bit of progress on my implementation, using a custom
(pseudo-)field.²

My code works, but I can't exactly say I understand all of it, which
isn't really a good basis to work from. In particular, studying
the custom model fields howto³ left my brain smoking. All these
different adapter functions (e.g. get_prep_lookup, etc.) certainly
have very well-defined purposes, but I can't say that these are
easily discerned from reading the documentation.

Are you aware of some sort of flow-chart that depicts the
translations that are happening, for all the different functions and
use-cases (e.g. INSERT, UPDATE, SELECT)?

It would already help a lot to know what gets called when, and maybe
have a few immutables established in between.

If such a picture/document does not yet exist, maybe some of you
would be interested in working with me on creating it? I'd do the
heavy lifting, but if there'd be people around offering their
experience for querying and sanity checks, that'd be great. If
interested, maybe the best would be for you to reply off-list, and
then we could go about it? Or would it be acceptable to develop this
on-list?

Take care,
-m

¹) https://groups.google.com/forum/#!topic/django-developers/jx-14OddSqA
²) https://github.com/madduck/wafer/tree/147-kvpairs
³) https://docs.djangoproject.com/en/1.9/howto/custom-model-fields/

--
@martinkrafft | http://madduck.net/ | http://two.sentenc.es/

"it isn't pollution that's harming the environment.
it's the impurities in our air and water that are doing it."
- dan quayle

spamtraps: madduc...@madduck.net
digital_signature_gpg.asc
Reply all
Reply to author
Forward
0 new messages