Comment

Comment by Demiurge

Abusing python can really save your life sometimes. I think my favorite recent hack has been accessing and MODIFYING callers variable, due to inability to get it passed through the Django module to the callback.

  def invite_accepted(sender, email, **kwargs):
      import sys
      caller = sys._getframe(2)
      request = caller.f_locals['request']
      request.session['invite_accepted'] = True
parent Demiurge 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton