mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 03:17:07 +00:00
refactor: Move export into separate app
This commit is contained in:
@@ -77,6 +77,7 @@ THIRD_PARTY_APPS = [
|
||||
FIRST_PARTY_APPS = [
|
||||
'people',
|
||||
'activities',
|
||||
'export',
|
||||
]
|
||||
|
||||
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + FIRST_PARTY_APPS
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
{% if request.user.is_superuser %}
|
||||
<li class="nav-item">
|
||||
<a href="{% url 'export' %}" class="nav-link">Export</a>
|
||||
<a href="{% url 'export:index' %}" class="nav-link">Export</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item active" aria-current="page">Export Data</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<hr>
|
||||
|
||||
<table class="table table-borderless">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Records</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>People</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<a class="btn btn-info"
|
||||
href="{% url 'people:person.export' %}">Export</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Relationships</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<a class="btn btn-info"
|
||||
href="{% url 'people:relationship.export' %}">Export</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -28,9 +28,8 @@ urlpatterns = [
|
||||
views.IndexView.as_view(),
|
||||
name='index'),
|
||||
|
||||
path('export',
|
||||
views.ExportListView.as_view(),
|
||||
name='export'),
|
||||
path('',
|
||||
include('export.urls')),
|
||||
|
||||
path('',
|
||||
include('people.urls')),
|
||||
|
||||
@@ -4,13 +4,8 @@ Views belonging to the core of the project.
|
||||
These views don't represent any of the models in the apps.
|
||||
"""
|
||||
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
|
||||
class IndexView(TemplateView):
|
||||
template_name = 'index.html'
|
||||
|
||||
|
||||
class ExportListView(LoginRequiredMixin, TemplateView):
|
||||
template_name = 'export.html'
|
||||
|
||||
Reference in New Issue
Block a user