Example #1
0
 def post(self, request, *args, **kwargs):
     raw_filename = request.POST['rawfilename']
     filename, type, lang, code = request.POST['filename'], request.POST['type'], \
                                  request.POST['lang'], request.POST['code']
     save_program_file(self.session, filename, type, lang, code, raw_filename)
     return HttpResponse()
Example #2
0
 def post(self, request, *args, **kwargs):
     type = request.POST['type']
     sp = SpecialProgram.objects.get(builtin=True, filename=type)
     save_program_file(self.session, sp.filename, sp.category, sp.lang, sp.code)
     return HttpResponse()