How to deploy a feature branch to heroku

We often have many issues/feature which need to fix/enhance/add.

When developing an feature, we write code in local, the code is not finished. But we found out there is a critical bugs in production, and that bug need to fix immediately. We will need to deploy a hot fix the bug, but the hot fix should not contains the incomplete code we wrote for the new feature.

»

Author image Kien Nguyen

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

Mysql without password

When dealing with database, sometime we want to make backup database. I usually use mysqldump to store all database in sql file. The problem is when running, mysqldump ask us to provide password. If you must enter password everytime you run the command, you cannot make it run automatically with crontab script

»

Author image Kien Nguyen