[Answer]-Textbox warning for large queries with Django

1👍

Yes, query object has the method like this. It is simply:
query.count()

0👍

No, I don’t think django has a function that will do this. You could easily do this, if you wanted to, using django and javascript though.

Loading a site with 1000 results really isn’t that many. If the number of results is affecting performance, paginate them.

I think it might be a bit cleaner to just load the results page, directly, with either:

  1. paginated results
  2. no results and have an ajax request fetch results after the page is loaded, so the page doesn’t lag while loading all results

What will your user think of an intermediarary popup? I belive to maximize their expereince, load the page in the fastest least intrusive way possible

Leave a comment