Header

Gracefully Degrading, Bookmarkable Ajax with Django and JQuery

This article goes along with travis-weber.com, a website I recently released where one of the top priorities was that it would be completely ajaxified, like gmail. This brought with it a couple of issues such as what would happen when people came to the site and did not have javascript? How would people be able to bookmark portfolio items and other sections on the website? I want to share how I approached these issues and the solutions I came up with so that if a user has javascript disabled or a user wants to bookmark a specific page, it ...

Categories:  ajax, django, javascript, jquery
THU APR 10, 08

Introduction to Pygments

Pygments (http://pygments.org) is a very powerful, easy to use library that can help you with syntax highlighting on your blog or other documents. I am going to quickly show you 4 different ways you can use pygments to easily add syntax highlighting to your website. Pygments can be found in most package managers:

  • Debian/Ubuntu: aptitude install python-pygments
  • Gentoo: emerge pygments
  • Darwin Ports: port install pygments
  • Easy Install: easy_install Pygments

Command Line

pygmentize is the command line tool that the pygments library provides. Here is a quick reference for common use cases:

  • Output HTML: pygmentize -f html -o ...
Categories:  django, javascript, pygments
TUE APR 22, 08