Frameworks Repository

Few days ago I started new page with hope to test new web technologies and keep up to date with SEO technics.

On site I plan to gather all possible frameworks (as much I could handle to manage) with options to easy search and compare. For now I started adding most popular frameworks – I hope you may help (I’m working on proposal page).

You may found it here: http://frameworks.click

Please share it 🙂

Quickly setup SQL query logging on console in Django

There is need plugin for Django, named django-debug-toolbar but it needs some time to configure. So when I need simple way to debug SQL queries I use small hack. Add to your settings.py:

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'handlers': {
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
        }
    },
    'loggers': {
        'django.db.backends': {
            'handlers': ['console'],
            'level': 'DEBUG',
        },
    }
}

To get this working DEBUG option have to be set to True:

DEBUG = True

After this setup, when you run you app in development mode:

./manage.py runserver

you will see SQL queries in console output.

Source:
https://docs.djangoproject.com/en/1.6/topics/logging/#examples