Browse Source

Remove project detail

pull/10/head
Hironsan 6 years ago
parent
commit
623521de3c
3 changed files with 2 additions and 83 deletions
  1. 70
      doccano/app/server/templates/project_detail.html
  2. 5
      doccano/app/server/urls.py
  3. 10
      doccano/app/server/views.py

70
doccano/app/server/templates/project_detail.html

@ -1,70 +0,0 @@
{% extends "base.html" %}
{% load static %}
{% block content %}
<section class="container" id="root">
<div class="columns">
<div class="column is-9">
<div class="box content">
<article class="post">
<h4>{{ object.name }}</h4>
<div class="media">
<div class="media-left">
<p class="image is-32x32">
<img src="http://bulma.io/images/placeholders/128x128.png">
</p>
</div>
<div class="media-content">
<div class="content">
<p>{{ object.description|truncatechars:200 }}</p>
<p>
<a href="#">@jsmith</a> created at {{ object.created_at|date }} &nbsp;
<span class="tag">Question</span>
</p>
</div>
</div>
<div class="media-right">
<span class="has-text-grey-light">
<i class="fa fa-comments"></i> 1</span>
</div>
</div>
</article>
</div>
</div>
<div class="column is-3">
<a class="button is-primary is-block is-alt is-large" href="#">New Project</a>
<aside class="menu">
<p class="menu-label">
Tags
</p>
<ul class="menu-list">
<li>
<span class="tag is-primary is-medium ">Dashboard</span>
</li>
<li>
<span class="tag is-link is-medium ">Customers</span>
</li>
<li>
<span class="tag is-light is-danger is-medium ">Authentication</span>
</li>
<li>
<span class="tag is-dark is-medium ">Payments</span>
</li>
<li>
<span class="tag is-success is-medium ">Transfers</span>
</li>
<li>
<span class="tag is-warning is-medium ">Balance</span>
</li>
<li>
<span class="tag is-medium ">Question</span>
</li>
</ul>
</aside>
</div>
</div>
</section>
{% endblock %}

5
doccano/app/server/urls.py

@ -1,13 +1,12 @@
from django.urls import path
from .views import AnnotationView, AnnotationAPIView, MetaInfoAPI, SearchAPI
from .views import ProjectListView, ProjectDetailView, ProjectAdminView, RawDataAPI, LabelAPI
from .views import ProjectListView, ProjectAdminView, RawDataAPI, LabelAPI
urlpatterns = [
path('', ProjectListView.as_view(), name='project-list'),
path('<int:pk>/', ProjectDetailView.as_view(), name='project-detail'),
path('<int:pk>/admin', ProjectAdminView.as_view()),
path('<int:project_id>/docs', AnnotationView.as_view()),
path('<int:project_id>/', AnnotationView.as_view()),
path('<int:project_id>/apis/data', AnnotationAPIView.as_view()),
path('<int:pk>/apis/raw_data', RawDataAPI.as_view(), name='data_api'),
path('<int:pk>/apis/labels', LabelAPI.as_view(), name='label_api'),

10
doccano/app/server/views.py

@ -150,16 +150,6 @@ class ProjectListView(ListView):
return context
class ProjectDetailView(DetailView):
model = Project
template_name = 'project_detail.html'
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
return context
class ProjectAdminView(DetailView):
model = Project

Loading…
Cancel
Save