On Thu, Nov 14, 2013 at 9:37 AM, Timothy W. Cook <[email protected]> wrote:
> Well, this isn't likely a Django specific question but since this
> project is built in Django, I'd like to know how best to handle this
> issue.
>
> I have a view that calls a function and performs a long running
> process. It reads and processes a file, creating potentially
> thousands of objects and can take up to several minutes to complete.
>
> Right now it just displays a pretty much blank template. This isn't
> very user friendly. I imagine some kind of counter or progress bar
> but I am not certain how best to display this via Django.
>
> What do others do in this case?
>
I have a situation where I'm loading a lot of images that takes a long
time. What I do is I have this code in my template:
<span class='loadMsg' style='display: none; color:lightgray; text-align:
left;'> ... loading images </span>
$('.loadMsg').show();
window.onload = function() {
$(function() {
$('.loadMsg').hide();
});
};
Not the most elegant thing in the world, but it works and meets my needs.
YMMV
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CACwCsY5U1ngNF_WiNJv40nrW-U%3DsuB5DxEhaQ2_2rDk7X1W7JQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.