Frequently Asked Questions

Who did this?

The backend code was written by me -- James Bennett -- and the design was done by Jeff Croft.

Why did you build this site?

Because it seemed like a good idea. Up until now, finding useful bits of Django-related code has been a bit of a pain, because code is scattered across the Django wiki and various peoples' blogs. I'm hoping that this site will make that easier by providing a simple way to post and organize cool pieces of code.

So... it's a pastebin?

Not really. The Django community already has a pastebin at dpaste.com (courtesy of Paul Bissex), and that's useful when you need to temporarily have someone look at a piece of code (since pastebin apps generally "expire" their entries after a while). This site's geared more at putting finished pieces of code up for posterity.

Can I have the code?

Sure. This site runs off two applications I've developed, both of which are open source and hosted on Google Code: Cab is the snippets application itself, and django-registration handles the user-registration part. It's all under the same BSD license as Django itself, so feel free to grab the code and do what you like with it.

Why isn't there a search system?

Because no-one's yet written a good generic search system for Django. When somebody does, I'll look into adding it.

I never got my registration email!

Your mail server probably ate it; I've been getting all sorts of crazy bounce messages from overzealous spam filters since taking the site live. If you don't get the email within 24 hours of signing up, email me -- ubernostrum@gmail.com -- and I'll activate you manually.

I found a bug!

If you spot a bug, use the ticket tracker on Google Code (see above) to report it, and I'll do my best to fix it right away.

What license are the code snippets under?

No particular license; everyone who signs up agrees to the Terms of Service which simply state that code they post can be used by anyone in any way.

Can I use the design of this site?

No. I didn't design this site. Jeff did, and I wouldn't feel good about giving away his hard work.

Why do you allow snippets in languages other than Python?

Because there's more to Django than Python; you need templates with a mix of tags and HTML, you often want some JavaScript and every once in a while you need to drop down to SQL for a custom query. So this site will accept snippets in any of those languages.

The snippets application the site runs on lets an administrator choose the exact set of languages, so if you'd like something different you can always grab the code and install it on your own site.

How do you do the code highlighting?

Using an extremely cool Python highlighting library called Pygments. It's pretty much the best thing ever.

Why do I have to have an account to do so many things?

Because it makes the site easier to run :)

Requiring an account makes the bookmarking features possible and makes things like ratings ever so much easier. And requiring an account to comment goes a long way toward fighting spam. And I've done my best to make signing up as easy as possible, so hopefully it won't get in the way too much.

Why can't I see other peoples' bookmarks?

Because I never got around to implementing it. There's some cool stuff in the bookmarking code that I'll expose once the site really gets going, and I may add viewing other users' bookmarks in there when I do. But bookmarking is primarily so that you can keep track of snippets you liked, and you can already see a list of the most-bookmarked snippets, so I'm not sure it'd add much.

I have a question you didn't answer!

Feel free to email me -- ubernostrum@gmail.com -- or to ping me on IRC (I'm pretty much always in the Django IRC channel, signed on as "ubernostrum"), and I'll do my best to answer whatever's on your mind.