Author Archives: Laurence

Add Facebook Open Graph (OG) meta tags to your WordPress site with one function

See below for a basic WordPress function that adds Facebook Open Graph OG meta tags to your WordPress site. Works with WordPress version 4.7.2 (at this site). Facebook OG meta tags have become a standard way of making embedded links … Continue reading

Posted in Code | Tagged | Comments Off on Add Facebook Open Graph (OG) meta tags to your WordPress site with one function

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