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 f28e9036..79b9f5ea 100644 Binary files a/doccano/app/db.sqlite3 and b/doccano/app/db.sqlite3 differ 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'