示例#1
0
def delete(request, lm_id):
    lm = LM.objects.get(id=lm_id)
    
    files.remove_file(files.arpa_file_path(lm))
    files.remove_file(files.lm_file_path(lm))
    
    lm.delete()
    return HttpResponseRedirect(reverse("lm:index"))
示例#2
0
 def arpa_file(self):
     path = files.arpa_file_path(self)
     return files.file_contents(path)
示例#3
0
 def arpa_file(self):
     path = files.arpa_file_path(self)
     return files.file_contents(path)