From a00afeac21807a662e5963ee162f23624b39cc90 Mon Sep 17 00:00:00 2001 From: Hironsan Date: Mon, 25 Jun 2018 11:01:20 +0900 Subject: [PATCH] Add index.html --- doccano/app/app/urls.py | 2 +- doccano/app/db.sqlite3 | Bin 233472 -> 233472 bytes doccano/app/server/static/forum.css | 3 -- doccano/app/server/templates/base.html | 17 +++++-- doccano/app/server/templates/index.html | 65 ++++++++++++++++++++++++ doccano/app/server/urls.py | 20 ++++---- doccano/app/server/views.py | 7 +++ 7 files changed, 96 insertions(+), 18 deletions(-) create mode 100644 doccano/app/server/templates/index.html diff --git a/doccano/app/app/urls.py b/doccano/app/app/urls.py index d930789e..d394ab8e 100644 --- a/doccano/app/app/urls.py +++ b/doccano/app/app/urls.py @@ -19,7 +19,7 @@ from django.contrib.auth.views import LoginView, PasswordResetView, LogoutView urlpatterns = [ - path('projects/', include('server.urls')), + path('', include('server.urls')), path('admin/', admin.site.urls), path('login/', LoginView.as_view(template_name='login.html', redirect_authenticated_user=True), name='login'), diff --git a/doccano/app/db.sqlite3 b/doccano/app/db.sqlite3 index f28e90361f0558f29811498edbd4daf5a0d019e4..79b9f5ea7035eec10806072c77a0367926f11474 100644 GIT binary patch delta 196 zcmZozz}K*VZ-O+V=H zp6zaHnCuu?7#JAsws)*$s$}Bj-_F3qKZ${V68|0k?VAM?TKK0=+Rvm4RKlP-y=N_x r!t~qwnbdgs4+E7gVc>tnzl47YP}wy8=}XQt$%B;1Z$EyX$?^aI?*uzL delta 196 zcmZozz}K*VZ-O+V&_o$$Rv`vGi4z-BKIkz%+#IUE^Z+{p0|OhwL$1w?3IF966$k*) zrUDj$b`}T5?JN#V-|X2S3br*cedlKZvN^Z^?q^~X-~}?7dE6NI4)M0|xNTNcu;AJ5 zwuZ@$k)_F+iFJF&TBb@Sup0hJ4E&S$@9=NmESS*3KYh}ECRG*{W?#nXJ!_d1rr+Mr lqy|y8gn|DN|6%?mKxNbTr!P6rB+nwp?8vzN_<1JF0|3hfIOPBU diff --git a/doccano/app/server/static/forum.css b/doccano/app/server/static/forum.css index 2f2d7d95..76109885 100644 --- a/doccano/app/server/static/forum.css +++ b/doccano/app/server/static/forum.css @@ -14,9 +14,6 @@ footer { .container .columns { margin: 2rem 0; } -.navbar-menu .navbar-item { - padding: 0 2rem; -} aside.menu { padding-top: 3rem; } diff --git a/doccano/app/server/templates/base.html b/doccano/app/server/templates/base.html index a0421af4..71cdee9f 100644 --- a/doccano/app/server/templates/base.html +++ b/doccano/app/server/templates/base.html @@ -24,12 +24,20 @@ - {% block content %} - {% endblock %} - - + {% block content %} {% endblock %} + + diff --git a/doccano/app/server/templates/index.html b/doccano/app/server/templates/index.html new file mode 100644 index 00000000..eaf0dde3 --- /dev/null +++ b/doccano/app/server/templates/index.html @@ -0,0 +1,65 @@ +{% extends "base.html" %} {% block content %} +
+
+
+
+

Doccano

+

+ A document annotation tool by active learning. +

+

+ + Try Demo + +

+
+
+ +
+
+
+ Description +
+
+
+

+ Document Annotation +

+

+ Label document for any document classification tasks. +

+
+

+ + Try Demo + +

+
+
+ +
+ +
+

+ Sequence Labeling +

+

+ A super easy interface to tag for named entity recognition, part-of-speech tagging, semantic role labeling. +

+
+

+ + Try Demo + +

+
+ +
+
+ Description +
+
+
+
+
+{% endblock %} \ No newline at end of file diff --git a/doccano/app/server/urls.py b/doccano/app/server/urls.py index 8c4ef699..13ab724b 100644 --- a/doccano/app/server/urls.py +++ b/doccano/app/server/urls.py @@ -1,16 +1,18 @@ from django.urls import path +from .views import IndexView 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('/download', DataDownloadAPI.as_view(), name='download'), - path('/', InboxView.as_view(), name='annotation'), - path('/apis/data', AnnotationAPIView.as_view()), - path('/apis/raw_data', RawDataAPI.as_view(), name='data_api'), - path('/apis/labels', LabelAPI.as_view(), name='label_api'), - path('/apis/progress', ProgressAPI.as_view()), - path('/apis/search', SearchAPI.as_view()), + path('', IndexView.as_view(), name='index'), + path('projects/', ProjectListView.as_view(), name='project-list'), + path('projects//admin', ProjectAdminView.as_view(), name='project-admin'), + path('projects//download', DataDownloadAPI.as_view(), name='download'), + path('projects//', InboxView.as_view(), name='annotation'), + path('projects//apis/data', AnnotationAPIView.as_view()), + path('projects//apis/raw_data', RawDataAPI.as_view(), name='data_api'), + path('projects//apis/labels', LabelAPI.as_view(), name='label_api'), + path('projects//apis/progress', ProgressAPI.as_view()), + path('projects//apis/search', SearchAPI.as_view()), ] diff --git a/doccano/app/server/views.py b/doccano/app/server/views.py index e4dc6fd1..b3767c02 100644 --- a/doccano/app/server/views.py +++ b/doccano/app/server/views.py @@ -10,6 +10,13 @@ from django.core.paginator import Paginator from .models import Annotation, Label, Document, Project +class IndexView(View): + template_name = 'index.html' + + def get(self, request, *args, **kwargs): + return render(request, self.template_name) + + class InboxView(View): template_name = 'annotation.html'