1. Now with SSL

    In the wake of the Heartbleed bug, I've decided to put forth the effort to get an SSL certificate for my website. After carefully checking to make sure my server was updated to a newer version of OpenSSL I started searching for free or low cost certificates. I found free …

    read more
  2. Django cached template loader

    Using the cached template loader instead of the default loader seems to have made a huge difference in the page load times especially on the blog. To enable the cached template loader change your template loaders to:

    TEMPLATE_LOADERS = (
        ('django.template.loaders.cached.Loader', (
            'django.template.loaders.filesystem.Loader',
            'django.template …
    read more
  3. Django is slow for me

    I'm seeing over one second page loads from Django and Gunicorn. I've taken a look with django debug toolbar but that isn't telling me what's taking all the time, just the main html page is taking a long time.

    read more
  4. Setting up Django memcached

    sudo apt-get install memcached libmemcached-dev
    sudo pip install pylibmc
    

    Add to settings.py

    CACHES = {
        'default': {
            'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
            'LOCATION': '127.0.0.1:11211',
         }
    }
    

    Add to middleware

    'django.middleware.cache.UpdateCacheMiddleware',
    ...
    'django.middleware.cache.FetchFromCacheMiddleware',
    
    read more
  5. Setting up Django memcached pt 2

    It seems that just adding the cache middleware does not actually cause anything to be cached. Django-CMS handles its own caching. This is great except that the default cache time for a page is 60 seconds. Which is odd since Django-CMS seems to store version information in the cache to …

    read more
Proudly powered by Pelican, which takes great advantage of Python.