A year ago, I created LOST-Theories.com as one of my first Django projects and released the source code, with the idea that anyone interested in Django could use a full example from a working site to help them get off the ground.
Over the past week, I’ve completely revamped that code base with all the knowledge I’ve gained since the original release (which, frankly, is a lot). Again, I’m releasing the course code.
The reason I put this code out there is for you to learn from. I don’t put it out there as an ongoing open source project that will be regularly updated and publicly maintained. I won’t consider feature requests. This isn’t for you to download, install, and use directly — it’s example code to help you with your Django project.
When I released the code a year ago I did so with a major caveat: I am not a programmer, and I don’t promise my code is perfect in any way. Today, I feel a lot more comfortable saying that the code here is pretty good, but I am still most definitely not a serious programmer and you should take anything I’ve done with a grain of salt. It works, but I can’t promise it’s fully optimized.
However, it is a lot more optimized than before. There were a few major performance issues with my old code, which came to bite me in the ass when LOST-Theories.com started to get really popular. I’ve fixed them.
Additionally, LOST-Theories.com now relies more heavily on the great third-party Django applications that are out there today, but weren’t a year ago. In particular, LOST-Theories.com uses django-registration from James Bennett and django-voting from Jonathan Buchanan. They are not included in the LOST-Theories code, as they are separate apps that run alongside LOST-Theories. These two apps are wonderfully easy to install, integrate, and make use of — I highly recommend you check them out.
The Django templates in the package make use of several template tags I’ve written or collected over the past year that aren’t included in the package. As such, hey won’t work for you directly. That’s okay, since the point is not for you to use this code directly, but rather to learn from it.
Finally, I’ll note that when I released the code last time, I explicitly stated that the design of the site is copyrighted and is not yours for the taking. Of course, people took it anyway. The same is still true: do not steal my design, please.
With all that said, enjoy the new LOST-Theories.com code. :)
001 // Brian Breslin // 05.28.2007 // 7:45 PM
jeff, you rock. a day after i asked for the code!
002 // Trey Piepmeier // 05.28.2007 // 9:24 PM
Awesome. There must be some Django in the air lately. I’ve just started messing around with it again after a hiatus. Thanks, Jeff!
003 // Scott Johnson // 05.28.2007 // 10:03 PM
Heh, a day after I finally got around to getting Django installed on my server, I get this to play with. Thanks for taking the time to release the code, Jeff. It’s much appreciated.
004 // Henrik Lied // 05.29.2007 // 2:43 AM
This is great, Jeff! I was thinking about sending you an e-mail, because I was really curious to see how the algoritm for the “interestingness”-page looked like. Thanks a bunch!
005 // Jonathan Buchanan // 05.29.2007 // 3:18 AM
Hey, another member of the default
views.pyclub! :)006 // Robert // 06.15.2007 // 9:18 AM
Jeff, I must say that I’m really surprised.
I’ve learnt a lot from the previous L-T code, but now I think this will take much more time to understand it.
Are you sure that you put all the “views.py” content there ? :-)
Diving into the code..
Thanks!
007 // Stefan // 06.28.2007 // 3:33 PM
Thank you for sharing your code. Now I understand django more clearly…
One question remains: How did you do the reuse of your pagination block? I assume this mysterious taglib has something to do with?
008 // Jeff Croft // 06.28.2007 // 4 PM
@Stefan: Yeah, I have an inclusion in my “taglib” collection of template tags for pagination. Luckily, it’s not so mysterious. It’s almost exactly the same as the one posted on DjangoSnippets.org:
http://www.djangosnippets.org/snippets/73/
I only modified it very, very slightly. :)
009 // Stefan // 06.29.2007 // 6:31 AM
Thank you for this tip, I will browsing around the snippets. Working with django/python as a newbie feels like the head is exploding – but django is an impressive framework.
010 // Arun // 08.16.2007 // 8:27 AM
Thanks a lot for your source code. Also, not to be an ass or anything, but I noticed a typo here:
Don’t you mean the source code? :)
Any way, thanks again.
011 // Kevin Dixon // 05.14.2008 // 3:46 AM
Hi Lost Theories seems to be not working. Please restart it so everyone can say goodbye to the site. Say for ome month until the end of the season 4!
012 // StitchExp626 // 05.14.2008 // 3:48 AM
Hi Lost Theories seems to be not working. Please restart it so everyone can say goodbye to the site. Say for one month until the end of the season 4!
013 // Anonymous(known on lost theories as X) // 05.15.2008 // 11:57 AM
I completely agree. That site was my filler.