Category Archives: Web Programming

ImportError: cannot import name sanitizer when trying to run django

I hope this saves you a couple hours of headaches that I experienced recently. If you get the dreaded error: from html5lib import sanitizer, serializer, treebuilders, treewalkers ImportError: cannot import name sanitizer Never fear. The fix is easy once you … Continue reading

Posted in django, python, Web Programming | Comments Off on ImportError: cannot import name sanitizer when trying to run django

KeyError: ‘en-us’ when doing a reverse() lookup in urls.py

If you’re getting an error like this: … in reverse_dict return self._reverse_dict[language_code] KeyError: ‘en-us’ If your urls.py file contains a reverse() call, that is the reason.  You’re calling reverse before all the urls are loaded and everything is ready.  You … Continue reading

Posted in django, python, Web Programming | Comments Off on KeyError: ‘en-us’ when doing a reverse() lookup in urls.py

Respsonsive tables

Sometimes you need to display a big table but you want it to be usable on a mobile phone.  Responsive Tables to the rescue. http://elvery.net/demo/responsive-tables/ The best one, in my opinion, is the “No More Tables” demo at the bottom … Continue reading

Posted in CSS | Comments Off on Respsonsive tables