From bdca3b6c2aa991a82c95a6c9fef560d19c02737d Mon Sep 17 00:00:00 2001 From: virusdefender Date: Fri, 3 Feb 2017 22:31:50 +0800 Subject: [PATCH] add content type --- judge/languages.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/judge/languages.py b/judge/languages.py index 2ccd72a..5e5fdd7 100644 --- a/judge/languages.py +++ b/judge/languages.py @@ -95,11 +95,11 @@ _py2_lang_config = { languages = [ {"config": _c_lang_config, "spj": {"compile": _c_lang_spj_compile, "config": _c_lang_spj_config}, - "name": "C", "description": "GCC 4.8"}, + "name": "C", "description": "GCC 4.8", "content_type": "text/x-csrc"}, {"config": _cpp_lang_config, "spj": {"compile": _cpp_lang_spj_compile, "config": _cpp_lang_spj_config}, - "name": "C++", "description": "G++ 4.8"}, - {"config": _java_lang_config, "name": "Java", "description": "OpenJDK 1.7"}, - {"config": _py2_lang_config, "name": "Python2", "description": "Python 2.7"} + "name": "C++", "description": "G++ 4.8", "content_type": "text/x-c++src"}, + {"config": _java_lang_config, "name": "Java", "description": "OpenJDK 1.7", "content_type": "text/x-java"}, + {"config": _py2_lang_config, "name": "Python2", "description": "Python 2.7", "content_type": "text/x-python"} ] spj_languages = list(filter(lambda item: "spj" in item, languages))