f8a72a0a60658d462753fe39a2119932358ccca5,app/server/views.py,DataUpload,post,#DataUpload#Any#,58
Before Change
try:
if import_format == "csv":
form_data = TextIOWrapper(
request.FILES["file"].file, encoding="utf-8")
if project.is_type_of(Project.SEQUENCE_LABELING):
Document.objects.bulk_create([
Document(text=line.strip(), project=project)
After Change
except Exception as e:
logger.exception(e)
messages.add_message(request, messages.ERROR, "Something went wrong")
return HttpResponseRedirect(reverse("upload", args=[project.id]))
class DataDownload(SuperUserMixin, LoginRequiredMixin, TemplateView):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: chakki-works/doccano
Commit Name: f8a72a0a60658d462753fe39a2119932358ccca5
Time: 2018-12-26
Author: sergiy.n@attendify.com
File Name: app/server/views.py
Class Name: DataUpload
Method Name: post
Project Name: comic/grand-challenge.org
Commit Name: 6499769919b50f645fd3d76623225eacf0cd141d
Time: 2013-07-08
Author: w.s.kerkstra@gmail.com
File Name: django/comicsite/tests.py
Class Name: ViewsTest
Method Name: _signup_user
Project Name: comic/grand-challenge.org
Commit Name: 3c53d87a9515c81df25b818e577d7dce66f18f90
Time: 2013-07-08
Author: w.s.kerkstra@gmail.com
File Name: django/comicsite/tests.py
Class Name: ViewsTest
Method Name: _signup_user