summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 1d24bda..bc0b4f1 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -29,10 +29,10 @@ import tempfile
from textwrap import dedent
from ast import literal_eval
from .file_utils import extract_files, delete_files
-from yaksh.code_server import(submit,
- get_result as get_result_from_code_server
- )
-from yaksh.settings import SERVER_POOL_PORT
+from yaksh.code_server import (
+ submit, get_result as get_result_from_code_server
+)
+from yaksh.settings import SERVER_POOL_PORT, SERVER_HOST_NAME
from django.conf import settings
from django.forms.models import model_to_dict
@@ -1705,7 +1705,7 @@ class AnswerPaper(models.Model):
elif question.type == 'code' or question.type == "upload":
user_dir = self.user.profile.get_user_dir()
- url = 'http://localhost:%s' % server_port
+ url = '{0}:{1}'.format(SERVER_HOST_NAME, SERVER_POOL_PORT)
submit(url, uid, json_data, user_dir)
result = {'uid': uid, 'status': 'running'}
return result