Skip to content

Commit

Permalink
Merge pull request #118 from mistercrunch/python_op_code
Browse files Browse the repository at this point in the history
Render python_callable source code in Task Details for PythonOperator
  • Loading branch information
mistercrunch committed Jul 9, 2015
2 parents c84b649 + 5d7a705 commit 1f63fda
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions airflow/www/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from datetime import datetime, timedelta
import dateutil.parser
from functools import wraps
import inspect
import json
import logging
import os
Expand Down Expand Up @@ -128,6 +129,8 @@ def wrapped_markdown(s):
'doc_rst': lambda x: pygment_html_render(x, lexers.RstLexer),
'doc_yaml': lambda x: pygment_html_render(x, lexers.YamlLexer),
'doc_md': wrapped_markdown,
'python_callable': lambda x: pygment_html_render(
inspect.getsource(x), lexers.PythonLexer),
}


Expand Down

0 comments on commit 1f63fda

Please sign in to comment.