Sleeping in a web server, which potentially has many users, is considered bad form, even if it works. A better place for such time outs is in JavaScript in the browser. Some designs use a view that the JavaScript (or user) can poll to determine when the resource is available.
On Wed, Mar 4, 2015 at 12:03 PM, dk <demi...@gmail.com> wrote: > i am using matplotlib to generate a plot/graph, even do that python is > generating the file and saving it so I can use it later on in my web page, > django show the page before the process finish, > so I decided to put a time.sleep(3) so it wait 3 sec while all this > happen, but doesn't respect that =( > > any ideas why that might happen or a workaround? > > I usually get in my web page an old plot so I have to click refresh on the > page to get the new actual one =(. > thank.s > > -- > 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 django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > 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/536faca6-2abb-4df6-b97d-414cc199e8d4%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/536faca6-2abb-4df6-b97d-414cc199e8d4%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. 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/CAB%2BAj0tB_YaTxL1Q_daosy7MLXpfDsspWCtMX8zO8W%3DgALVFfA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.