2020-03-23 16:40:09 +00:00
|
|
|
{% extends 'layout.html' %}
|
2020-04-21 14:09:21 +00:00
|
|
|
{% load humanize %}
|
2020-03-23 16:40:09 +00:00
|
|
|
{% block content %}
|
2020-09-30 04:45:59 +00:00
|
|
|
<div class="block">
|
|
|
|
<h2 class="title">Import Books from GoodReads</h2>
|
2020-03-23 16:40:09 +00:00
|
|
|
<form name="import" action="/import_data/" method="post" enctype="multipart/form-data">
|
|
|
|
{% csrf_token %}
|
|
|
|
{{ import_form.as_p }}
|
2020-09-30 04:45:59 +00:00
|
|
|
<button class="button" type="submit">Import</button>
|
2020-03-23 16:40:09 +00:00
|
|
|
</form>
|
2020-04-28 13:59:48 +00:00
|
|
|
<p>
|
|
|
|
Imports are limited in size, and only the first {{ limit }} items will be imported.
|
2020-09-30 04:45:59 +00:00
|
|
|
</div>
|
2020-04-21 14:09:21 +00:00
|
|
|
|
2020-09-30 04:45:59 +00:00
|
|
|
<div class="content block">
|
|
|
|
<h2 class="title">Recent Imports</h2>
|
|
|
|
{% if not jobs %}
|
|
|
|
<p>No recent imports</p>
|
|
|
|
{% endif %}
|
2020-04-21 14:09:21 +00:00
|
|
|
<ul>
|
|
|
|
{% for job in jobs %}
|
|
|
|
<li><a href="/import_status/{{ job.id }}">{{ job.created_date | naturaltime }}</a></li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2020-03-23 16:40:09 +00:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|