_("An error occurred: %(exception)s\n\n%(tb)s") % {
'exception': exception, 'tb': tb
},
- mimetype='text/plain'
+ content_type='text/plain'
)
return HttpResponse(_("Book imported successfully"))
return HttpResponse(_("Error importing file: %r") % book_import_form.errors)
def collections(request):
- objects = Collection.objects.filter(role='')
+ objects = Collection.objects.all()
if len(objects) > 3:
best = random.sample(list(objects), 3)