Re: href not working
I think the mistake is using a '/' before the name inside href. Try changing it from href= '/contact'/ to href= 'contact/' Have a great day > On 31-May-2018, at 9:26 AM, Caleb Bryson wrote: > > So i am trying to create a directory with a Home,Blog,and Contact selection. > But every time i click on one of them they all go back to the home page. How > do i fix this, and here is the secton of code below. let me know if you need > to see more > > > > Home > Blog > Contact > > > -- > 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 https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/9dc7004b-4fff-412d-8560-6308f13db92c%40googlegroups.com. > 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/AD00040D-010E-4613-BAA8-07A3C028FAF9%40gmail.com. For more options, visit https://groups.google.com/d/optout.
Implementing a 'please wait' page
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-15 mins another 'results' page is displayed. I want to be able to display a page saying 'please wait for ' after submit button is clicked. Can you please give me any ideas on how to implement this. Here is a rough representation of my code flow: Main function (): -lots of code -call to sub function() //this is the guy taking 10-15 mins to execute -if sub function() returns true then proceed else break and exit. -remaining code of Main function() As you might have guessed, I want to be able to change the display when this sub function () is hit. Btw, main function () is executed when user clicks on submit button. Appreciate your help! Thanks and Have a great day, Mohammed Noor -- 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5CF991C0-FB63-47BA-9A2A-47224E468D0B%40gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Implementing a 'please wait' page
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? 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, 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 for the complete time this process >> takes to run and after say 10-15 mins another 'results' page is displayed. >> >> >> I want to be able to display a page saying 'please wait for > time taken to complete process>' after submit button is clicked. Can you >> please give me any ideas on how to implement this. >> >> >> Here is a rough representation of my code flow: >> >> Main function (): >> -lots of code >> -call to sub function() //this is the guy taking 10-15 mins to execute >> -if sub function() returns true then proceed else break and exit. >> -remaining code of Main function() >> >> As you might have guessed, I want to be able to change the display when >> this sub function () is hit. Btw, main function () is executed when user >> clicks on submit button. >> >> >> Appreciate your help! >> >> Thanks and Have a great day, >> Mohammed Noor >> >> -- >> 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 https://groups.google.com/group/django-users. >> To view this discussion on the web visit https://groups.google.com/d/ms >> gid/django-users/5CF991C0-FB63-47BA-9A2A-47224E468D0B%40gmail.com. >> 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 https://groups.google.com/group/django-users. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-users/CAEqej2OTHwsOe5svxqbd31h1NSniROe9pnmbDm%2BN3vPGtUPTSw% > 40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAEqej2OTHwsOe5svxqbd31h1NSniROe9pnmbDm%2BN3vPGtUPTSw%40mail.gmail.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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABANScQyp9rDr8sD8Gxf-y%2BFJ1RawBOAZuRNJ9LPwfUToWw%3DOw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Implementing a 'please wait' page
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, 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 the > server has, imagine if 100 users hit your server for tasks and have to wait > 15 minutes. your original method won't scale at all beyond a handful of > users. > -- > 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 https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/a087bbd2-bde4-4740-838a-e7d870dcf6e1%40googlegroups.com. > 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/147E8DE4-BA93-466E-BB1A-AF022A4225E1%40gmail.com. For more options, visit https://groups.google.com/d/optout.
Progress bar with celery
Hello guys, I have been trying to create a progress bar in my django application using celery. But i have been greatly unsuccessful in trying to make it work. It would be great if i can get some examples/tutorials which show how to do it. The problem im facing is, my configured tasks aren’t seem to be running. No matter what i try, the celery tasks just don’t run. Please help me out. -khasim -- 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3AB4400F-D496-49C5-9DA0-FC72DA908FAA%40gmail.com. For more options, visit https://groups.google.com/d/optout.
Redirecting django app webpages through celery task
Hello guys, I need to create a django application that takes a repository url, builds the code located in the url location and runs a few tests. If the tests are successfull, it tags the code and then sends an email to the user notifying the same. Because the building process takes a long time, I have used celery to run it as a background process. I am implementing the following design. def main_function(request): # lines_of_code result=tasks.BuildCodeAndVerify.delay(args) #few more lines of code return (request,'waiting_page.html',context) Note: The waiting page has a progress bar that reads percentage progress from my celery task i.e BuildCodeAndVerify. *Now, I am facing two problems:* 1. If the build is successful, i need to redirect from the waiting page and update the html view with a success page and a summary of the build. How do i make the celery task redirect a webpage? Also, it needs to pass a dictionary to the webpage containing a summary. How do i do all this? 2. Is it possible to pass the request object as an argument like BuildCodeAndVerify(request,other_args). Because whenever I try i get an error saying. "WSGI error: type object is not JSON serializable." And I have very limited django and python knowledge so please go easy on me if my questions look naive. Would be grateful for any help and advice i can get. Thanks a lot! Khasim -- 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABANScQFwPxUi7p2-ePTe5k9Sap5wGkABwSrtcCX50EbNZQpoQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Redirecting django app webpages through celery task
But isn't request a multi object type dictionary? What's the problem with passing a dictionary as a parameter. On Mon, Jun 11, 2018 at 7:40 PM, Jason wrote: > 1, you can't. you can expose an URL and view for your client-side app to > request for task state. if response of state is "SUCCESS", then you can > trigger a client side redirect. > 2. when using celery, pass in only the data it's needed, such as a db > record ID, and do all your retrievals inside the task. > > Some reading for celery best practices: > > https://denibertovic.com/posts/celery-best-practices/ > https://blog.balthazar-rouberol.com/celery-best-practices > https://khashtamov.com/en/celery-best-practices-practical-approach/ > > > On Monday, June 11, 2018 at 9:14:42 AM UTC-4, Mohammed Noor wrote: >> >> Hello guys, >> >> I need to create a django application that takes a repository url, >> builds the code located in the url location and runs a few tests. If the >> tests are successfull, it tags the code and then sends an email to the user >> notifying the same. >> >> Because the building process takes a long time, I have used celery to run >> it as a background process. I am implementing the following design. >> >> def main_function(request): >> # lines_of_code >> result=tasks.BuildCodeAndVerify.delay(args) >> #few more lines of code >> return (request,'waiting_page.html',context) >> >> Note: The waiting page has a progress bar that reads percentage progress >> from my celery task i.e BuildCodeAndVerify. >> >> *Now, I am facing two problems:* >> >> 1. If the build is successful, i need to redirect from the waiting page >> and update the html view with a success page and a summary of the build. >> How do i make the celery task redirect a webpage? Also, it needs to pass >> a dictionary to the webpage containing a summary. How do i do all this? >> >> 2. Is it possible to pass the request object as an argument like >> BuildCodeAndVerify(request,other_args). Because whenever I try i get an >> error saying. "WSGI error: type object is not JSON serializable." >> >> >> And I have very limited django and python knowledge so please go easy on >> me if my questions look naive. >> >> Would be grateful for any help and advice i can get. >> >> Thanks a lot! >> Khasim >> >> -- > 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 https://groups.google.com/group/django-users. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-users/2c43e673-d203-4a78-882f-1723c9c9bd0c%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/2c43e673-d203-4a78-882f-1723c9c9bd0c%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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABANScTisa5K_Y%3DxD_YfbQhUAEAqm4gNnAs3-jkKmQaJx7TRxw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Running a celery worker as a windows service
Hello guys, I have a celery worker that I need to be running on a server 24/7. Currently, I am running it in a cmd window. But I need to convert this to a background windows service so that it can run always without the danger of being closed by anyone. Any ideas how this can be done? Regards, Mohammed Noor -- 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABANScS-vGLuRBOoLdojJiVWPvN0UTjCCJsAxsj5e%2Bcc%3DBzC8g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Running a celery worker as a windows service
Thanks. I solved it by writing a batch file to run the celery worker and creating a windows task to run the batch file. On Thu, Jun 21, 2018 at 4:03 PM, Jason wrote: > there's documentation on this http://docs.celeryproject.org/en/latest/ > userguide/daemonizing.html > > but not sure if they're compatible with windows. > > > On Thursday, June 21, 2018 at 3:50:03 AM UTC-4, Mohammed Noor wrote: >> >> Hello guys, >> >> I have a celery worker that I need to be running on a server 24/7. >> Currently, I am running it in a cmd window. But I need to convert this to a >> background windows service so that it can run always without the danger of >> being closed by anyone. >> >> Any ideas how this can be done? >> >> Regards, >> Mohammed Noor >> > -- > 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 https://groups.google.com/group/django-users. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-users/710953fa-2e11-432e-9cee-7c86a46755f8%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/710953fa-2e11-432e-9cee-7c86a46755f8%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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABANScTVbzHR%3DJtx9rJAw1mp-p8%2BoY%2Bwze4qZzrBZQhemu-YxQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.