Re: Implementing a 'please wait' page

2018-06-01 Thread Melvyn Sopacua
On vrijdag 1 juni 2018 01:35:36 CEST Mohammed Noor wrote: > I want to be able to display a page saying 'please wait for taken to complete process>' after submit button is clicked. Can you please > give me any ideas on how to implement this. As said by others, celery is one way to do this and th

Re: Implementing a 'please wait' page

2018-06-01 Thread Larry Martell
On Thu, May 31, 2018 at 7:35 PM, Mohammed Noor wrote: > Hello Guys, > > I currently have a process running on my django application which takes about > 10-15 minutes to complete. > > Currently, the user clicks on a 'submit' button and this process starts. The > web page remains in a hung state f

Re: Implementing a 'please wait' page

2018-06-01 Thread Mohammed Noor
Wow. Yeah. That scenario of 100 users hitting together...honestly, I haven't thought much about it. Would using celery help me overcome this problem? > On 01-Jun-2018, at 4:33 PM, Jason wrote: > > you can with celery, just make a view that checks the task ID of the task and > if its PENDING,

Re: Implementing a 'please wait' page

2018-06-01 Thread Jason
you can with celery, just make a view that checks the task ID of the task and if its PENDING, return 'waiting', which would be used by your browser. also consider the fact that servers will require you to specifically override the connection timeout setting. with finite numbers of connections

Re: Implementing a 'please wait' page

2018-06-01 Thread Mohammed Noor
Thanks Mark! I will surely have a look at them. But I was hoping if there was a way of getting this done using ajax or jquery. Mohammed Noor On Fri, Jun 1, 2018 at 11:55 AM, Mark Phillips wrote: > Have you looked at celery (http://www.celeryproject.org/) to handle the > long running process? P

Re: Implementing a 'please wait' page

2018-05-31 Thread Mark Phillips
Have you looked at celery (http://www.celeryproject.org/) to handle the long running process? Perhaps in conjunction with redis (https://redis.io/)? If you passed the long running process to celery, then you could change the page to "say please wait". Mark On Thu, May 31, 2018 at 4:35 PM, Mo

Implementing a 'please wait' page

2018-05-31 Thread Mohammed Noor
Hello Guys, I currently have a process running on my django application which takes about 10-15 minutes to complete. Currently, the user clicks on a 'submit' button and this process starts. The web page remains in a hung state for the complete time this process takes to run and after say 10-1

Re: Please wait page trouble

2010-09-10 Thread Alec Shaner
Excellent. Glad you got it working. On Fri, Sep 10, 2010 at 8:54 AM, Bradley Hintze wrote: > I got to work! I needed a good nights sleep to see it. the url was > '/DHM_run/' NOT '/run_DHM/'. > > Thanks Alec > > -- You received this message because you are subscribed to the Google Groups "Djan

Re: Please wait page trouble

2010-09-10 Thread Bradley Hintze
_url}, ...) >> >> please_wait.html could then substitute the {{ calculation_url }} context >> variable as the argument to the {% url %} tag. >> >> Your run_DHM view could now return the url to redirect to instead of just >> 'OK'. You'll have t

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
bably where you'd start thinking about a JSON > response as you might return a dictionary with an result code ('OK' or > 'error') along with a url to redirect the user to. > > window.location.href = data; > > Or if you've switched to a JSON response it mig

Re: Please wait page trouble

2010-09-09 Thread Alec Shaner
after checking that data.result = 'OK'. Hope that all makes sense. On Thu, Sep 9, 2010 at 12:00 PM, Bradley Hintze wrote: > OK, > > Got it working. Sorry one more question. I have a couple of places > where I'd like to display the 'Please Wait' page.

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
OK, Got it working. Sorry one more question. I have a couple of places where I'd like to display the 'Please Wait' page. I'd imagine I'd do something similar to the following:: # please_wait.html ... http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"<

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
in the background (usually asynchronously), so they >> > don't directly change the page you're currently viewing in your browser. >> > The >> > browser is responsible for dispatching the response returned from your >> > AJAX >> > call, typically by inv

Re: Please wait page trouble

2010-09-09 Thread Alec Shaner
you specified when the > AJAX > > request was initiated. So you don't do a redirect from the server, rather > > you can do it using client side javascript in your callback function. > > > > Here is how it basically works: > > 1. Please Wait page makes AJAX

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
a callback function you specified when the AJAX > request was initiated. So you don't do a redirect from the server, rather > you can do it using client side javascript in your callback function. > > Here is how it basically works: > 1. Please Wait page makes AJAX request to run

Re: Please wait page trouble

2010-09-09 Thread Joe Casper
u post the full url.py file? > > > > And as Brian mentioned your javascript block should be separated. Plus > you > > have an extra }); that's going to fail once you resolve this reverse > error. > > It's also not clear what you intend to happen when run_DHM

Re: Please wait page trouble

2010-09-09 Thread Alec Shaner
orks: 1. Please Wait page makes AJAX request to run_DHM, specifies callback function when request completes. 2. run_DHM performs calculations, stores results in session, returns an "OK" response. 3. Browser invokes the callback function specified in step 1, which should change the pa

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
this reverse error. > It's also not clear what you intend to happen when run_DHM returns its > response? It looks like your intent is to do a redirect and run_DHM will use > session data to retrieve calculation results. > > Just to clarify, I think your plan is to: > > 1. D

Re: Please wait page trouble

2010-09-09 Thread Alec Shaner
intent is to do a redirect and run_DHM will use session data to retrieve calculation results. Just to clarify, I think your plan is to: 1. Display a Please Wait page that fires off an AJAX call to some view that performs calculations => run_DHM. The results of the calculations are stored in t

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
#url.py ... (r'^please_wait/', please_wait), (r'^DHM_run/$', run_DHM), ... #please_wait.html http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js";> $.getJSON('{% url run_DHM %}') }); #view.py def please_wait(request): c = {'we_r_home':'yes'} return render_to_respon

Re: Please wait page trouble

2010-09-08 Thread Brian Neal
On Sep 8, 5:56 pm, Bradley Hintze wrote: > This is what I have in my please_wait.html > > src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js";> > $.getJSON('{% url run_DHM %}')}); > > I

Re: Please wait page trouble

2010-09-08 Thread Piotr Zalewa
Do you have it in the urls.py file? Would be best to paste it into pastebin or here if it's few lines only zalun On 09/08/10 23:56, Bradley Hintze wrote: > This is what I have in my please_wait.html > > src="

Re: Please wait page trouble

2010-09-08 Thread Bradley Hintze
This is what I have in my please_wait.html http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js";> $.getJSON('{% url run_DHM %}') }); This is the django error Caught NoReverseMatch while rendering: Reverse for 'run_DHM' with arguments '()' and keyword arguments '{}' not found. run

Re: Please wait page trouble

2010-09-07 Thread Alec Shaner
You need to include the jquery library script in your html page if you're calling getJSON as in the previous emails (and note that getJSON isn't necessarily the function you want - jquery provides many options for doing AJAX). Either download it, or use one of the public repositories: http://docs.

Re: Please wait page trouble

2010-09-07 Thread Bradley Hintze
It seems as if this is the only solution but after a week of trying to implement it in a variety of ways it won't work. is there something I need to download (jquery)? More helpful would be a real HTML page as an example or a live example on the web. I am sorry for the trouble but I'd like to under

Re: Please wait page trouble

2010-08-31 Thread Alec Shaner
$.getJSON should be embedded in your initial Page Wait response page. The first argument isn't a view, rather a URL. So you might want to use the django url template tag, e.g., $.getJSON('{% url whatever.run_DHM %}', ...) The second argument is a callback function. The browser stores the callback

Re: Please wait page trouble

2010-08-31 Thread Bradley Hintze
first step?). You > can indeed call a view.my function from your please wait template, but you > want to do it in the background, i.e., with an AJAX request in order to keep > the Please Wait message displayed while your server processes the request. > > On Tue, Aug 31, 2010 at 2:46 PM

Re: Please wait page trouble

2010-08-31 Thread Alec Shaner
ns on row > to render a 'please wait' page while other python works? Can I call a > view.my function to run from my 'please wait' template? > > Please be as elementary as possible as javascript, AJAX, jquery, and > the like are brand new to me. > > Thanks

Re: Please wait page trouble

2010-08-31 Thread Bradley Hintze
I'm getting no where with this, are there any other suggestions on row to render a 'please wait' page while other python works? Can I call a view.my function to run from my 'please wait' template? Please be as elementary as possible as javascript, AJAX, jquery, and the

Re: Please wait page trouble

2010-08-31 Thread Bradley Hintze
oza La Fuente wrote: > On Mon, Aug 30, 2010 at 7:18 PM, Bradley Hintze > wrote: >> I am attempting to do a lengthe calculation that will require the user >> to wait a bit. I want a 'Please wait page to come up while the lengthy >> calculation is performed. I thought th

Re: Please wait page trouble

2010-08-30 Thread Rolando Espinoza La Fuente
On Mon, Aug 30, 2010 at 7:18 PM, Bradley Hintze wrote: > I am attempting to do a lengthe calculation that will require the user > to wait a bit. I want a 'Please wait page to come up while the lengthy > calculation is performed. I thought this might work: > > views.py > &g

Please wait page trouble

2010-08-30 Thread Bradley Hintze
I am attempting to do a lengthe calculation that will require the user to wait a bit. I want a 'Please wait page to come up while the lengthy calculation is performed. I thought this might work: views.py def please_wait(request): return HttpResponse('Please Wait..') def

Re: Please wait page

2010-08-23 Thread Gerard Flanagan
Bradley Hintze wrote: Hi all, My webpage has a process that takes about 10-15 seconds. Is there a way I can have an intermediate 'Please wait' page, preferably with blinking shapes (dots) so that the user knows that the process is still working. As an example try finding a flight at

Please wait page

2010-08-23 Thread Bradley Hintze
Hi all, My webpage has a process that takes about 10-15 seconds. Is there a way I can have an intermediate 'Please wait' page, preferably with blinking shapes (dots) so that the user knows that the process is still working. As an example try finding a flight at orbitz.com, t