Django with Celery

11 views
Skip to first unread message

Satyam Mishra

unread,
Jul 20, 2018, 7:37:42 AM7/20/18
to Django users
Hello,

i want to integrate my django application with the celery ,i follow the official documentation and some other blogs of celery but i'm not able to find out that how to connect it with my django application for eg. i have a user registration form then how i assign it to celery 

Thanks

Julio Biason

unread,
Jul 20, 2018, 7:59:40 AM7/20/18
to django...@googlegroups.com
Hi Satyam,

Well, Celery is used for background tasks, like running requests to other services out of the response loop and such. Your question is confusing 'cause forms are used to validate user input and, well, there is no user in a background task.

What you can do is have a normal form attached to a view and, if the form `.is_valid()`, you call the celery function to do the whole processing of the registration form. Just be sure that, if your registration takes less than a second, it is not worth running in a background task.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@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/873e9ec3-6eb8-4118-81cd-ee8373d3b1de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Julio Biason, Sofware Engineer
AZION  |  Deliver. Accelerate. Protect.
Office: +55 51 3083 8101  |  Mobile: +55 51 99907 0554
Reply all
Reply to author
Forward
0 new messages