1👍
Since the ajax calls are blocking as said by chrisdpratt, if you really need to display the images at the same time I would advise some kind of preloading of the 3×3 grid of images and when required by the code you can display them.
With this in mind you can run the code you already have on $(document).ready()
but make the images hidden (ie display:none
). When later required you would just change the display attribute on the images you need to display.
1👍
If the issue you were seeing was indeed caused by the single-threaded implementation of the Django development server, you might try django-devserver
(https://github.com/dcramer/django-devserver). Amongst other improvements, it boasts:
“An improved runserver allowing you to process requests simultaneously.”
The other improvements make it worth it, too!
- [Answered ]-Change template name for Django's auth views
- [Answered ]-Misaka template tags for Django – text wrapped in double quotes
- [Answered ]-Django – how to set forms.FileField name
- [Answered ]-Django REST Framework after PUT/PATCH action