Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- logger = logging.getLogger(__name__)
- def context_logger(context, request):
- for key, val in context.items():
- if key is not 'page_form' and key is not 'failure_form':
- logger.debug('%s - context for %s: %s', request.get_full_path(), key, val)
- logger.debug(sys._getframe().f_lineno)
- def index(request):
- products, tools = menu()
- job_executions = jobs_in_progress()
- context = {"products": products, "tools": tools, "job_executions": job_executions}
- context_logger(context, request)
- # i am able to get the line number here
- logger.debug(sys._getframe().f_lineno)
- return render(request, "app/index.html", context)
- (sys._getframe().f_lineno)
Add Comment
Please, Sign In to add comment