forked from mirrors/bookwyrm
Increase limit to 500 entries and warn about limit.
This commit is contained in:
parent
4f9edae05a
commit
543cc29ee1
3 changed files with 6 additions and 2 deletions
|
@ -7,8 +7,8 @@ from fedireads.tasks import app
|
||||||
from fedireads.models import ImportJob, ImportItem
|
from fedireads.models import ImportJob, ImportItem
|
||||||
from fedireads.status import create_notification
|
from fedireads.status import create_notification
|
||||||
|
|
||||||
# TODO: remove or notify about this in the UI
|
# TODO: remove or increase once we're confident it's not causing problems.
|
||||||
MAX_ENTRIES = 20
|
MAX_ENTRIES = 500
|
||||||
|
|
||||||
|
|
||||||
def create_job(user, csv_file):
|
def create_job(user, csv_file):
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
{{ import_form.as_p }}
|
{{ import_form.as_p }}
|
||||||
<button type="submit">Import</button>
|
<button type="submit">Import</button>
|
||||||
</form>
|
</form>
|
||||||
|
<p>
|
||||||
|
Imports are limited in size, and only the first {{ limit }} items will be imported.
|
||||||
|
|
||||||
<h2>Recent Imports</h2>
|
<h2>Recent Imports</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -9,6 +9,7 @@ from django.views.decorators.csrf import csrf_exempt
|
||||||
|
|
||||||
from fedireads import activitypub
|
from fedireads import activitypub
|
||||||
from fedireads import forms, models, books_manager
|
from fedireads import forms, models, books_manager
|
||||||
|
from fedireads import goodreads_import
|
||||||
from fedireads.tasks import app
|
from fedireads.tasks import app
|
||||||
|
|
||||||
|
|
||||||
|
@ -162,6 +163,7 @@ def import_page(request):
|
||||||
'import_form': forms.ImportForm(),
|
'import_form': forms.ImportForm(),
|
||||||
'jobs': models.ImportJob.
|
'jobs': models.ImportJob.
|
||||||
objects.filter(user=request.user).order_by('-created_date'),
|
objects.filter(user=request.user).order_by('-created_date'),
|
||||||
|
'limit': goodreads_import.MAX_ENTRIES,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue