Running celery task synchronous when testing django app

Celery support running task synchronous by config variable CELERY_ALWAYS_EAGER. But where to put this variable? and could I can select run celery task synchronous with some testcase?

I do some googling but did not find any good result. So I post this on my blog to help someone like me.

»

Author image Kien Nguyen

Django show sql query in shell

To show sql query in python manage.py shell, we use this code import logging l = logging.getLogger('django.db.backends') l.setLevel(logging.DEBUG) l. »

Author image Kien Nguyen

Authentication django-tastypie in right way

When using django-tastypie, I got some problems with security. In my pinterest-clone application, I build a pin model. A pin is a image with a description and tags for it`

»

Author image Kien Nguyen