defrex/django-after-response

how to import a model into "after response"?

eulercosta opened this issue · 0 comments

I need to import a model into the after response, but I can not.

import after_response

@after_response.enable
def example():
from automacao.models import Automacao
Automacao.objects.count()
...

{ProgrammingError}relation "automacao" does not exist
LINE 1: SELECT COUNT(*) FROM "automacao" WHERE "automacao"."is_delet...