Disable warnings when running django's manage.py
Python spewing warnings when trying to tab-complete django management commands like this?
$ ./manage.py bower/Users/lemuelf/.virtualenvs/hotel-deals/src/sorl-thumbnail/sorl/thumbnail/helpers.py:5: RemovedInDjango19Warning: django.utils.importlib will be removed in Django 1.9.
from django.utils.importlib import import_module
bower bower_freeze bower_install
Then edit your manage.py file and add -W ignore
to the shebang line.
#!/usr/bin/env python -W ignore
import os
import sys
...
Much cleaner now
$ ./manage.py bower
bower bower_freeze bower_install
Written by Lemuel Formacil
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#