Is this compatible with all versions of Django that DIN supports?
  --> I guess so, but I didn't test it

As for private implementation detail, I'm not sure there is a better way to do it (cf. comment below).