diff options
author | adityacp | 2017-01-05 15:51:35 +0530 |
---|---|---|
committer | adityacp | 2017-01-05 15:51:35 +0530 |
commit | 5f29daff88815e3ba87a2ff5933086e505e41581 (patch) | |
tree | 6bb30fb5397ba95fc92539cd23e4879d91310ef5 /yaksh/scripts | |
parent | 3f9773c4eb2a21902ccdefab89c7f503a08f1743 (diff) | |
download | online_test-5f29daff88815e3ba87a2ff5933086e505e41581.tar.gz online_test-5f29daff88815e3ba87a2ff5933086e505e41581.tar.bz2 online_test-5f29daff88815e3ba87a2ff5933086e505e41581.zip |
Fix cli for python 3
Diffstat (limited to 'yaksh/scripts')
-rw-r--r-- | yaksh/scripts/cli.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/yaksh/scripts/cli.py b/yaksh/scripts/cli.py index 283cb12..1489af7 100644 --- a/yaksh/scripts/cli.py +++ b/yaksh/scripts/cli.py @@ -11,7 +11,7 @@ from django.conf import settings from django.core import management from django.template import Template, Context -from project_detail import NAME, PATH +from .project_detail import NAME, PATH CUR_DIR = os.getcwd() SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) @@ -136,10 +136,8 @@ def _render_demo_files(template_path, output_path, context=None): with open(template_path, 'r') as template_file: content = template_file.read() if context: - content = content.decode('utf-8') template = Template(content) content = template.render(context) - content = content.encode('utf-8') with open(output_path, 'w') as new_file: new_file.write(content) |