Back in June of 2006, I created LOST-theories.com, one of my first Django-powered sites. Because it seemed like it might be useful for people who were trying to learn Django, I released the source code for the site — not so much for people to take and use directly, but so people would be able to see how a Django site was built, from the ground up. I had no idea it would be so popular. I still get e-mails every week from people thanking me for giving them a complete example.
But I always felt a little sketchy about it. I’m not a great programmer by any means, and I was even worse then. If I were re-doing LOST-theories.com today, a lot of the code would be different. I’ve thought about taking the code offline for that reason. But, I’ve left it, because it seems like people really, really needed some full-site examples of Django code.
Well, this past week, two different Django-powered sites were launched with full source code available. What’s more, they were both created by far more accomplished programmers than me. And what’s even more, both of them sport designs that I had something to do with.
The first site, CheeseRater, was created by Jacob Kaplan-Moss (one of the lead developers of Django) as part of a presentation he was giving at PyCon last week. The concept is a simple one: CheeseRater lets you rate Python projects and libraries from the Cheeseshop, a popular repository of such things. It’s a really nice example piece for doing Digg-style +/- rating systems.
Jacob asked me to help make his presentation project a bit prettier, so I whipped up a very quick Photoshop mockup for him and he handled the CSS and XHTML from there.
Check the footer of the site for a link to the source code, all tar’d up nicely for your perusal and appropriation.
Perhaps even more interesting to Django developers old and new is DjangoSnippets.org, the brainchild of Django release manager James Bennett. It’s a pastebin-style app, written in Django of course, for storing and sharing snippets of code for use in your Django apps. So, not only is the source for the site itself available, but you’re also likely to find snippets on the site that will be useful to you in learning Django. For example, Jacob posted a template tag I’d be bugging him to write for a while, and I posted a Django version of Shaun Inman’s “widont“, for avoiding typographic widows. James describes the web app, which he calls “Cab,” as follows:
Cab (named for Cab Calloway) is a simple Django-based application designed to make it easy for a team, or a community, to share code snippets, while providing plenty of useful features:
Besides the source for Cab, James has also released django-registration, a “simple, portable, generic user-registration application for Django projects.” It follows a common registration parttern:
LOST-theories.com handled registration the same way, but there are many reasons why James’ django-registration does it much better. You can imagine how a generic registration app like this will be useful in many web apps (I’d even assert that it might be a candidate for django.contrib, the package of add-on apps included with Django itself).
As with CheeseRater, I helped James out by doing a quick Photoshop comp, which he then pieced together with XHTML and CSS. I wouldn’t call either one of these sites my greatest design achievement, but I think both designs work and are appropriate for the project.
The official Django website, djangoproject.com, has made its source code available since day one. It’s another great example of how a site is built with Django from the ground-up. It even includes a basic blog application.
The point is that LOST-theories.com isn’t the only site out there offering its source code for you to learn from. There are at least three sites now offering code written by much greater programmers than myself. If LOST-theories.com’s code has been useful to you, that’s awesome. I’m glad I could help. But, I think it’s safe to say you’d be much better off using these guys’ examples if you’re trying to learn how to build a Django site.
I just wanted to make sure you knew about them.
Sorry, the time to post comments to this entry has expired.
001 // BearXu // 02.25.2007 // 8:51 PM
Thanks Jeff to introduce these great but unknown apps. I love django’s app, so I hope the DjangoTeam will build a app repository soon and hope the team will visit China to give us nice keynotes
002 // Jacob Kaplan-Moss // 02.26.2007 // 12:31 AM
Thanks for the nice writeup, Jeff, and double-plus thanks for the cooool design. It’s gotten a number of props here at PyCon.
003 // Nicola Larosa // 02.26.2007 // 12:38 AM
Jeff, the link to Cab is broken (the “c” should be lowercase).
004 // Jeff Croft // 02.26.2007 // 12:55 AM
Thanks, Nicola — I’ve fixed it. :)
005 // Robbin Bonthond // 02.26.2007 // 1:57 AM
Thank you all very much !
006 // michele // 02.26.2007 // 5:32 AM
eh… nice sites, nice ideas… but… where’s openid? :(
007 // Bjorn Kristinsson // 02.26.2007 // 7:41 AM
Nice, but am I the only one who get’s a lovely Mod_python error on djangosnippets?
I tried to register this morning and got that error when I submitted.. have been unable to access the site since :\
008 // Kai Kuehne // 02.26.2007 // 10:14 AM
No, you’re not the only one. ;)
009 // Jeff Croft // 02.26.2007 // 10:30 AM
Yeah, looks like James has a little syntax error on his site. It was working last night, so he must’ve broke something along the way. I sent him an e-mail to let him know, but he’s at PyCon right now, so I’m not sure how busy he is — might take him a bit to get to it.
010 // Baxter // 02.26.2007 // 11:55 AM
It’s back (and sweet!). I keep thinking about making my source available, but I’m too embarrassed.
011 // Jeff Croft // 02.26.2007 // 3:14 PM
Alberto-
Consolas is indeed my favorite monospaced font (and the one I use here). However, I don’t have any control over the DjangoSnippets.org CSS — that’s all James Bennett. Perhaps he will see your suggestion, though.
012 // Jay States // 02.27.2007 // 9:29 AM
Jeff… I started down the road to Django because of this site and now these example help me over 1000%! Thanks, I’ve switched to Python and Django after 3 days of using it over php 5.
013 // radek // 02.27.2007 // 9:47 AM
+1
PS: Jeff, please, make the TAB order in the comment form flow from Your URL field directly to Your thoughts field. I always wonder thet I cannot type over Markdown hyperlink ;)
014 // mary // 02.28.2007 // 2:07 PM
I just need to know where can i find your source code for the django project as i am interested in it
Thank you in advance; Mary Adel
015 // Jeff Croft // 02.28.2007 // 2:15 PM
Mary, the source code for The Django Project website is available at:
http://code.djangoproject.com/browser/djangoproject.com
016 // Soltys // 03.01.2007 // 3:09 AM
From LOST-theories.com code i learn a lot, about Django. Thanks. Ps. I don’t like Lost serial :)
017 // mark // 03.06.2007 // 1:09 PM
Thanks for this! This should help SO MUCH!
018 // Scott Benjamin // 03.07.2007 // 3:02 AM
The Django community is really starting to ramp up. I love to see how people implement their sites with using it. It has really helped me branch out and think about solutions in an entirely different light.
Thanks!
019 // Stevem // 03.23.2007 // 2:02 AM
Why do you insist on using Helvetica when it looks so utterly pants on a PC?
Admittedly Helvetica isn’t standard on a PC but some of us do have it and it looks rubbish. I don’t know what it looks like on Vista though…
020 // Bret // 06.10.2007 // 11:42 AM
Didn’t they mean CheeseRatr?
021 // Gaurav // 08.21.2007 // 5:23 AM
hi, just downloaded cheeserater,its amazing.. just one addition, taking a note of django revision 5172 there w’ld be changes in the votes model.. need to import generic from contrib.contentypes ..
thanx!
022 // Mike // 06.30.2008 // 9:16 PM
I realize this is like a year old, but I just wanted to say THANKS for a new Django developer :)
023 // ruryuru // 07.02.2009 // 7:40 PM
tghggfgh
024 // Erorgetop // 02.08.2010 // 1:01 AM
[url=http://sopriventontes.net/][img]http://tonoviergates.net/img-add/euro2.jpg[/img][/url] [b]adobe photoshop cs3 class, [url=http://sopriventontes.net/]software for purchase order[/url] [url=http://sopriventontes.net/]software stores in canada[/url] student software discounts adobe acrobat 9 pro upgrade free software to sell [url=http://sopriventontes.net/]filemaker pro 10 torrent[/url] kaspersky anti-virus/security software [url=http://tonoviergates.net/]buy microsoft office 2003 software[/url] sell free software [url=http://sopriventontes.net/]windows xp sp1[/url] price calculation software sue nero [url=http://tonoviergates.net/]purchase word software[/url][/b]