Refactor django message call