From 1fcea9aef48661c2cfeba5ab67732e46f7626e2b Mon Sep 17 00:00:00 2001 From: Hironsan Date: Wed, 6 Jun 2018 13:19:29 +0900 Subject: [PATCH] Add admin template --- doccano/app/server/templates/admin.html | 197 ++++++++++++++++++++++++ doccano/app/server/urls.py | 3 +- doccano/app/server/views.py | 7 + 3 files changed, 206 insertions(+), 1 deletion(-) create mode 100644 doccano/app/server/templates/admin.html diff --git a/doccano/app/server/templates/admin.html b/doccano/app/server/templates/admin.html new file mode 100644 index 00000000..4ea78c52 --- /dev/null +++ b/doccano/app/server/templates/admin.html @@ -0,0 +1,197 @@ +{% extends "base.html" %} {% load static %} {% block header %} {% endblock %} {% block content %} +
+
+ +
+
+
+

Learning Curve

+
+
+
+ +
+
+
+
+
+
+ +
+
+

Stats

+ +
+
+
+

439k

+

Users

+
+
+
+
+

59k

+

Labels

+
+
+
+
+
+
+

3.4k

+

Records

+
+
+
+
+

19

+

Annotated

+
+
+
+
+
+
+ +
+
+
+

Labels

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Pos + Label nameShortcut keyDeletion
1 + Continental Region + k + Delete +
2 + Political Organization Other + g + Delete +
3 + Country + p + Delete +
+
+
+ +
+
+

Data Management

+

Data upload

+
+ +
+
+
+
+ +
+ + + +{% endblock %} \ No newline at end of file diff --git a/doccano/app/server/urls.py b/doccano/app/server/urls.py index f8347b21..f709950e 100644 --- a/doccano/app/server/urls.py +++ b/doccano/app/server/urls.py @@ -1,12 +1,13 @@ from django.urls import path -from .views import AnnotationView, AnnotationAPIView, MetaInfoAPI, SearchAPI +from .views import AnnotationView, AnnotationAPIView, MetaInfoAPI, SearchAPI, TestView from .views import ProjectListView, ProjectDetailView, ProjectAdminView, RawDataAPI, LabelAPI urlpatterns = [ path('', ProjectListView.as_view(), name='project-list'), path('/', ProjectDetailView.as_view(), name='project-detail'), path('/admin', ProjectAdminView.as_view()), + path('/test', TestView.as_view()), path('/docs', AnnotationView.as_view()), path('/apis/data', AnnotationAPIView.as_view()), path('/apis/raw_data', RawDataAPI.as_view(), name='data_api'), diff --git a/doccano/app/server/views.py b/doccano/app/server/views.py index 386a652d..783cbdd6 100644 --- a/doccano/app/server/views.py +++ b/doccano/app/server/views.py @@ -163,3 +163,10 @@ class ProjectAdminView(DetailView): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) return context + + +class TestView(View): + template_name = 'admin.html' + + def get(self, request, *args, **kwargs): + return render(request, self.template_name)