Merge pull request #96 from cthulahoops/goodreads_import
Goodreads import
This commit is contained in:
10
fedireads/templates/import.html
Normal file
10
fedireads/templates/import.html
Normal file
@ -0,0 +1,10 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% block content %}
|
||||
<div id="content">
|
||||
<form name="import" action="/import_data/" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{{ import_form.as_p }}
|
||||
<button type="submit">Import</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
18
fedireads/templates/import_results.html
Normal file
18
fedireads/templates/import_results.html
Normal file
@ -0,0 +1,18 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% block content %}
|
||||
<div id="content">
|
||||
<div>
|
||||
<h1>The following books could not be imported: </h1>
|
||||
|
||||
<ul>
|
||||
{% for item in failures %}
|
||||
<li>
|
||||
{{ item }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<p>{{ success_count }} books imported successfully</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
@ -31,6 +31,7 @@
|
||||
{% endif %}
|
||||
<li><a href="/#feed">Updates</a></li>
|
||||
<li><a href="/books">Discover Books</a></li>
|
||||
<li><a href="/import">Import Books</a><li>
|
||||
</ul>
|
||||
|
||||
<div id="actions">
|
||||
|
@ -21,13 +21,15 @@
|
||||
</h2>
|
||||
|
||||
{% if not hide_book and status.mention_books.count %}
|
||||
{% for book in status.mention_books.all|slice:"0:3" %}
|
||||
<div class="book-preview">
|
||||
{% if status.status_type == 'Review' %}
|
||||
{% include 'snippets/book.html' with book=status.mention_books.first %}
|
||||
{% include 'snippets/book.html' with book=book %}
|
||||
{% else %}
|
||||
{% include 'snippets/book.html' with book=status.mention_books.first description=True %}
|
||||
{% include 'snippets/book.html' with book=book description=True %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if not hide_book and status.book%}
|
||||
<div class="book-preview">
|
||||
|
Reference in New Issue
Block a user