diff --git a/doccano/app/server/templates/annotation.1.html b/doccano/app/server/templates/annotation.1.html deleted file mode 100644 index 76cea0e8..00000000 --- a/doccano/app/server/templates/annotation.1.html +++ /dev/null @@ -1,115 +0,0 @@ -{% extends "base.html" %} {% load static %} {% block header %} - {% endblock %} {% block content %} -
- -
-
-
- -
- -
- -
-
-
-
- -
-
-
- - - [[label.text]] - - [[label.prob]] -
-
-
-
-
-
-

[[ msg.text.slice(0, 100) ]]

-
-
-
-
-
-
-
- -
-
-
-
-
-
- - - [[label.text]] - - [[label.prob]] -
-
-
-
-
- [[ message_body ]] -
-
-
-
-
- - - - -{% endblock %} \ No newline at end of file diff --git a/doccano/app/server/templates/annotation.html b/doccano/app/server/templates/annotation.html index 7e49ffa9..76cea0e8 100644 --- a/doccano/app/server/templates/annotation.html +++ b/doccano/app/server/templates/annotation.html @@ -1,152 +1,115 @@ -{% extends "base.html" %} -{% load static %} +{% extends "base.html" %} {% load static %} {% block header %} + {% endblock %} {% block content %} +
+ +
+
+
+ +
+
- -
- - -
- - - - - - +
-
- - -
-
- -
- -
-
-
-
-
-

- [[ item['text'].slice(0, 100) ]] -

- -
-
+
+

[[ msg.text.slice(0, 100) ]]

+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + [[label.text]] + + [[label.prob]]
- - - +
+
+
+ [[ message_body ]] +
+
-
- - +
+ + + + {% endblock %} \ No newline at end of file diff --git a/doccano/app/server/urls.py b/doccano/app/server/urls.py index 2fe20408..8c4ef699 100644 --- a/doccano/app/server/urls.py +++ b/doccano/app/server/urls.py @@ -1,12 +1,11 @@ from django.urls import path -from .views import AnnotationView, AnnotationAPIView, ProgressAPI, SearchAPI, InboxView +from .views import AnnotationAPIView, ProgressAPI, SearchAPI, InboxView from .views import ProjectListView, ProjectAdminView, RawDataAPI, LabelAPI, DataDownloadAPI urlpatterns = [ path('', ProjectListView.as_view(), name='project-list'), path('/admin', ProjectAdminView.as_view(), name='project-admin'), - #path('/', AnnotationView.as_view(), name='annotation'), path('/download', DataDownloadAPI.as_view(), name='download'), path('/', InboxView.as_view(), name='annotation'), path('/apis/data', AnnotationAPIView.as_view()), diff --git a/doccano/app/server/views.py b/doccano/app/server/views.py index 908fd324..e4dc6fd1 100644 --- a/doccano/app/server/views.py +++ b/doccano/app/server/views.py @@ -10,15 +10,8 @@ from django.core.paginator import Paginator from .models import Annotation, Label, Document, Project -class AnnotationView(View): - template_name = 'annotation.html' - - def get(self, request, *args, **kwargs): - return render(request, self.template_name) - - class InboxView(View): - template_name = 'annotation.1.html' + template_name = 'annotation.html' def get(self, request, *args, **kwargs): return render(request, self.template_name) @@ -189,7 +182,6 @@ class ProjectAdminView(DetailView): class DataDownloadAPI(View): def get(self, request, *args, **kwargs): - # j = {'hoge': 'fuga'} annotated_docs = [a.as_dict() for a in Annotation.objects.filter(manual=True)] json_str = json.dumps(annotated_docs) response = HttpResponse(json_str, content_type='application/json')