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
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
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,
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
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
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
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
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
_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
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
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.
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"<
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
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
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
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
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
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
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
#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
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
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="
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
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.
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
$.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
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
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
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
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
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
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
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
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
34 matches
Mail list logo