About the dpaste.com pastebin

‣ Back

7593 pastes in the database

Plain   2811
Python   2359
Python Interactive/Traceback   1173
JavaScript   278
Bash script   247
Django Template/HTML   233
Diff   134
SQL   90
XML   77
Apache Config   59
Ruby   49
CSS   42
Ruby HTML (ERB)   36
Haskell   5

‣ Add yours

Recent site updates

April 20th [r298]: Added print stylesheet

February 17th [r286]: Set explicit blank default title to make scripted pastes easier

January 23rd [r276]: Fixed glitch in textarea auto-focus

May 17th [r235]: Extended expiry of "hold" items to 180 days and added an explanatory note to the 404 page.

January 7th [r137]: Added self-contained HTML option.

December 29th [r127]: Updated to Pygments r2583. Added Apache config and bash script colorizing.

December 19th [r119]: Fixed XSS vulnerability.

December 13th [r116]: Django models.* field types are now colorized.

December 12th [r107]: Updated to Pygments r2433.

November 16th [r89]: Made example item (shown to new users) work with "Plain" and "Copy" commands.

The Overview

This is a free public pastebin originally created for use by Django programmers on the #django IRC channel but open to everyone — really, if you like it, please use it.

Supported syntaxes include: Python code and interactive sessions, Django HTML templates, SQL, diffs, XML, CSS, JavaScript, Apache config files, bash scripts, Ruby, and RHTML.

The Philosophy

Simplicity and usability. The grayscale look makes the colorized source code stand out. Cookie-based personal defaults eliminate lots of extra form widgetry. Automatic expiry means the database never fills up. Auto-focus on the Code field means mouse-free operation. No required fields means you can paste, tab, return, and go. No running list of recent items means the spammers remain invisible. And Django makes nice clean URLs the path of least resistance.

The Components

This site is built with a bleeding-edge Subversion checkout of the Django web framework, written in Python, served by Apache, with a SQLite database back-end (!). The operating system is FreeBSD.

Syntax coloring is performed by Pygments, an excellent open source syntax-coloring library written in Python. Pygments handles many more languages than I have enabled here, and in addition to highly configurable HTML output can produce LaTEX and even ANSI terminal colored text.

The Backstory

This site began as an exercise. It seemed silly that Django coders didn't have a pastebin app written in Django, when writing a pastebin app is just a couple steps above "Hello, World" in complexity. Initially it was all generic views — in other words, it was some configuration info plus a couple templates — and worked great, but as I've added features some actual programming has been needed. The source to the "pure generic" version of the site is still available here. At some point I may release the latest source, but that's contingent on finding time to do the cleanup and enhancements on my list.

The Might-Do List

This site created and maintained by Paul Bissex. He is co-authoring an introduction to Django called Python Web Development with Django.