Increase limit to 500 entries and warn about limit.

This commit is contained in:
Adam Kelly 2020-04-28 14:59:48 +01:00
parent 4f9edae05a
commit 543cc29ee1
3 changed files with 6 additions and 2 deletions

View file

@ -7,8 +7,8 @@ from fedireads.tasks import app
from fedireads.models import ImportJob, ImportItem
from fedireads.status import create_notification
# TODO: remove or notify about this in the UI
MAX_ENTRIES = 20
# TODO: remove or increase once we're confident it's not causing problems.
MAX_ENTRIES = 500
def create_job(user, csv_file):

View file

@ -8,6 +8,8 @@
{{ import_form.as_p }}
<button type="submit">Import</button>
</form>
<p>
Imports are limited in size, and only the first {{ limit }} items will be imported.
<h2>Recent Imports</h2>
<ul>

View file

@ -9,6 +9,7 @@ from django.views.decorators.csrf import csrf_exempt
from fedireads import activitypub
from fedireads import forms, models, books_manager
from fedireads import goodreads_import
from fedireads.tasks import app
@ -162,6 +163,7 @@ def import_page(request):
'import_form': forms.ImportForm(),
'jobs': models.ImportJob.
objects.filter(user=request.user).order_by('-created_date'),
'limit': goodreads_import.MAX_ENTRIES,
})