Django-Stronghold with Django-Debug-Toolbar

Django Stronghold intercepts calls to Django Debug Toolbar panels which cause the panels to show your login page. This can easily be fixed to exclude the Debug Toolbar urls in your file:


The STRONGHOLD_DEFAULTS tells Stronghold to include regex patterns for Static and Media file urls so your static assets will work too.

Correct connection settings for ElasticSearch / Django-Haystack on

I should have read the documentation about this better, so I’m blogging this because I’m sure other people have had the same issue. requires the username and password to be sent as an http_auth header.

from urlparse import urlparse

es = urlparse(os.environ.get('BONSAI_URL'))
port = es.port or 80

    'default': {
        'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
        'URL': es.scheme + '://' + es.hostname + ':' + str(port),
        'INDEX_NAME': 'your_index_name',

if es.username:
    HAYSTACK_CONNECTIONS['default']['KWARGS'] = {"http_auth": es.username + ':' + es.password}

Dell Sputnik Tip: Mouse / Cursor is broken or frozen after resuming from suspend or sleep

For some reason my third generation Dell Sputnik (aka Dell XPS13 with Ubuntu pre-installed) sometimes has a frozen or broken mouse / cursor after I suspend or sleep my laptop.  You can easily get it working again (this is not a permanent fix) by switching to a different TTY and then back to the TTY that holds the x-server GUI.

  • ctrl+alt+F6 to switch to TTY6 (this will give you a terminal)
  • Do nothing in the terminal
  • ctrl-alt+F7 to switch back to the TTY7 which is the Ubuntu x-server
  • Voila… your mouse should be working again.

If anyone has a permanent fix, please let me know.

Installing Cython – x86_64-linux-gnu-gcc: error: unrecognized command line option ‘-fstack-protector-strong’

I went around and around trying to get Cython install on my Ubuntu 14.04 LTS box.  I kept getting:

x86_64-linux-gnu-gcc: error: unrecognized command line option ‘-fstack-protector-strong’

Turns out that the ‘-fstack-protector-strong’ option was not added to the GCC compiler until version 4.9.  Upgraded my GCC to the latest available fixed the issue.

The City of Munich — Switching Back to Windows from Linux?

 Munich’s much vaunted migration to Linux could be about to unravel, sending the city back into the fee-driven bosom of Microsoft.

The City of Munich, Germany has been a Linux user for over 10 years but it appears that city employees are clamoring to switch back to Windows.

The issue I see is that they built their own distribution – LiMux. It was originally based on Debian and then switched to Ubuntu. The last stable release of LiMux was in 2011 and is based on Ubuntu 10.04 LTS which was released in April 2010. That version of Ubuntu is seriously old in the tooth now — even Microsoft releases new version of Windoze faster.

Seems to me that the City of Munich suffers from “Not invented here” syndrome and would be better off if they just switch to an vendor with commercial support like Ubuntu or Red Hat instead of trying to build and maintain their own distro.