Tag Archives: django

Django – Correctly Wiring to AWS CloudFront for Static and Media Files

When it comes to “How To Setup a CDN for Django” most people suggest the following “half way” setup that can lead to stale cache problems and slowness in the admin. Configure Django to upload media and static files to … Continue reading

Posted in Application Development | Tagged , , | Comments Off on Django – Correctly Wiring to AWS CloudFront for Static and Media Files

Django enable SQL debug logging in shell how to

How to get Django to show debug SQL logging output in the shell. Works in Django 1.10! Start the Django shell: python manage.py shell Paste this into your shell: import logging log = logging.getLogger(‘django.db.backends’) log.setLevel(logging.DEBUG) log.addHandler(logging.StreamHandler()) The last line log.addHandler(logging.StreamHandler()) … Continue reading

Posted in Code | Tagged | Comments Off on Django enable SQL debug logging in shell how to