-
DjangoCon 2008 Keynote: Adrian Holovaty & Jacob Kaplan-Moss
Probably the single most relevant DjangoCon talk for most Djano developers, this fireside chat with Adrian and Jacob really covers the bases on where the framework will go in the future. As a sidenote, it also is a nice showcase of Jacob and Adrian’s personalities: they’re both really, genuine nice guys who are bright as hell but not at all opposed to criticism or other views (traits, which, in my view, have permeated the entire Django community). I’ve had my arguments with both dudes, but in the end, I love ‘em both. Great guys.
Visit -
DjangoCon 2008 Keynote: Cal Henderson on “Why I Hate Django”
Cal’s well-received talk from DjangoCon is very funny while making some great points. Most of his “serious” complaints about Django revolve around massive scaling, which he deals with on a daily basis at Flickr (which has both a huge data set and huge traffic). The reality is that none of the hot shit frameworks right now (Django, Rails, Cake, etc.) offer a lot of built in niceties for this level of scaling, and this is why (or at least part of the reason) we have a few notable sites built on them that haven’t managed to scale well at all as they’ve gotten more popular (coughTWITTERcough). The big question, of course, is: should a general-purpose framework like Django or Rails cater to the top 100 websites in the world, or should they focus on the needs of the other 99.9%? I don’t know the answer (and Cal says he doesn’t, either), but it’s an interesting topic. Plus, did I mention Cal is funny?
Visit -
Documents Reveal Django Pony, Caught In Tail Of Lies
Why The Lucky Stiff chimes in on the Django Pony, and is hilarious as per usual. Awesome.
Visit -
django-batchadmin
A pluggable Django app that adds batch deleting functionality to the admin (there are also hooks to add your own batch actions), thus solving one of my longest-standing complaints about Django. I understand this functionality will eventually be in Django itself, but quite frankly, the Django head honchos have been saying that for over two years now, and it’s still not there. This project, by Brian Beck, is really well put together. It’s subclases ModelAdmin, so that no changes are required to Django itself and minimal changes are required in the code of he app you want to take advantage of it (just change
VisitModelAdmintoBathModelAdmin). Awesome. -
Yashh: My first looks into Savoy
Yashh is helping me out by beat testing Savoy, and he’s posted some initial thoughts on his blog. He includes a diagram of the database structure (or, most of it, anyway), which will give you a good idea of the kinds of apps Savoy has in place, and explains a bit about how it’s all put together.
One note: Yashh talks about the savoy.contrib.comments app, which I write before the new django.contrib.comments app was released. I’ve debated back and forth about whether to ditch savoy.contrib.comments. It includes some functionality that django.contrib.comments doesn’t (blacklists, whitelists, akismet, etc.), but I’m not sure I really want to maintain it, now that django.contrib.comments doesn’t suck. Obviously, you can always simple choose to use django.contrib.comments instead of savoy.contrib.comments, even if both are in place (in fact, I’m doing that on a client site we’re working on now). What do you think? Is a more advanced comments app worth maintaining now that django.contrib.comments is 100 time less sucky?
Visit -
Denormalization Field for Django
I’ll let someone else test it, but I love it in concept. :)
Visit -
A simple example of row-level permissions in the admin
Simon posts another Django snippet, this one a demonstration of how simple it is to create row-level permissions using newforms-admin. Here, he has a simple blog entry model and sets up the admin such that users can only edit entries they authored.
Visit -
Django snippets: Orderable inlines using drag and drop with jQuery UI
Simon throws together a handy snippets which allows for orderable inlines using drag and drop (via jQuery) in the Django admin. Sweet.
Visit -
django-cms
django-cms is a new CMS for Django. Although it’s quite interesting, it’s totally not what I would want in a CMS. I’m a fan of structured data, rather than simple “add a page of text” sort of CMSes. But, it’s definitely well-done, so if that’s what you’re looking for, check it out. Even if it’s not what you’re looking for, be sure to check out the demo and the modifications to the Django admin interface. Quite interesting.
Visit -
Cappuccino Web Framework
I’m quite interested in Cappuccino and Objective-J. Too bad it seems the documentation sucks right now.
Visit -
dmigrations
A Django schema evolution tool created by Simon Willison and the team at Global Radio (formerly GCap Media), dmigrations looks great. It really seems to cover all the bases. I’ve yet to use any of the Django migration tools, but I’m really anxious to watch the video of the DjangoCon panel on the topic and see how each one might work for me.
Visit -
django-html
Handy bits by Simon Willison to make Django work a little cleaner when using forms with an HTML doctype (instead of XHTML). Personally, I think Django should default to HTML, but I bet this matter was argued ad nasuem in some Google Groups thread a year ago and XHTML won out (almost certainly at the chagrin of James Bennett). Am I right? Am I? :)
Visit -
CleverCSS
Quite interesting. Certainly the best implementation of dynamic CSS, including literals and the other typical functionality you see in these sots of things, that I’ve ever seen. I’m not sure if I could get into the habit of writing CSS this way, but it certainly would be pretty efficient if I could get myself into it. Hmm…cool stuff, even if I may never use it.
Visit -
Webmonkey DjangoCon Coverage
Webmonkey has some terrific coverage of DjangoCon, including this piece on the Django and journalism panel. What I took away from it is that Matt Croydon still wears his kakis with a cuff and a crease.
Visit -
Back to the great frameworks debate
Yeah, I’m going there. I want to talk about frameworks again. Bear with me…
I know I’ve discussed this topic at great length before, but it keeps coming up, and I still don’t have a very good understanding of all the positions people have taken on the topic. Last time I discussed this, I jumped to my own conclusions about why some people don’t like frameworks. This turned out to be a horrible idea, because people got on the defensive instead of trying to answer the simple questions I had asked. Let me be perfectly clear: I don’t care what your position is. If you don’t like frameworks, that’s fine. I’m just sincerely curious about why you don’t. I’m in no way trying to sell you on frameworks or tell you you’re wrong for not using them. I’m just trying to understand all sides. That’s what I do.
So, with that out of the way: if you’re not a fan of frameworks, I have some questions for you. I hope you’ll take the time to answer.
More -
Django 1.0 Cheat Sheet
Very nice cheat sheet for Django 1.0 from MercuryTide. Well-done.
Visit -
Django 1.0 released!
Now this is interesting: a web “framework” written in Python, released today. Apparently you can use it to develop web sites more quickly and efficiently. I hear it even makes programming “fun.” It’s great to see new projects still coming out on this front.
Oh, what’s that you say? Django’s been available for three years and used in production on major news sites even longer than that? Weird. You would think it would be at 5.0, by now. :)
Seriously — congrats to everyone involved. I’ve been keeping up with the latest revisions, and I know this: the Django I fell in love with a coupe years ago is a total piece of shit compared to 1.0.
Visit -
Django googlesearch
Uses the Google search API to add a simple site search to your Django project. Looks interesting. Might consider adding this to Savoy as a lightweight alternative to the more heavy-handed djangosearch.
Visit -
Porting your apps from Django 0.96 to 1.0
Comprehensive guide to porting Django .96 apps to Django 1.0. Short version? You’re going to be doing a lot of boring, tedious work. Have fun.
Visit -
Using Akismet with Django’s new comments framework
Great example of how badass the Django signals framework is. Basically, it lets you inject code upon some event happening, such as an object being saved, deleted, or in this case, a comment being posted. I use signals throughout Savoy, such as to geolocate an object as its saved, and to add a tumblelog object when particular types of content are saved. It’s good stuff. This example also uses Django’s brand-spanking new comments framework.
Visit -
Django in Linux Magazine
Frank Wiles has a nice piece on Django in the latest issue of Linux Magazine. He talks to Django lead developer Jacob Kaplan-Moss and covers all the basics. Both Frank and Jacob worked for the Lawrence Journal-World back when I did and have since moved on. In fact, Frank led the team that built a very cool Perl web framework called Gantry (http://www.usegantry.org/). It’s a little known bit of trivia that the Lawrence Journal-World actually is home to not one, but TWO open source web frameworks. Not bad for a small-town newspaper in Kansas, huh?
Not god enough for you? How about this: Linux Magazine is also based in Lawrence. :)
Visit -
Django comments app refactored (finally)
Since the first day I started working with Django in January of 2006, Jacob told me that the comments app would be rewritten before Django 1.0. It’s become something of a joke to me. Whenever someone says a feature is coming in a future version of Django, I throw out the classic, “oh yeah, along with the comments app refactor, right?”
Well today, that vaporware solidified into something real. The new version is documented, combines the old
CommentandFreeCommentmodels, and makes use of all the modern Django APIs that didn’t exist when the first version was written. It looks quite nice.I’m really curious to see just how many people who already have comments on their Django site go to the trouble of switching to the new app. I know I probably won’t. The trouble is, the old app was so — well, old — that almost everyone has written their own, or adopted something like Eric’s django-threaddedcomments. While it looks like it’s pretty easy to upgrade from the old comments app, I’m not sure anyone is really using the old comments app — and switching from custom apps, like the one I’ve written, wouldn’t be nearly as easy.
I think I’ll use the new
django.contrib.commentsgoing forward for sites that it feels appropriate for, and I’ll probably steal a few ideas from it for my own comments app — but migrating jeffcroft.com to it just seems like more trouble than it’s worth.That’s definitely not a dig on the new system though — like I said, it looks very nice. Kudos go to Thejaswi Puthraya, who did most of the works on the new system as part of Google’s Summer of Code, and Jacob Kaplan-Moss, who I know has had this thing on his radar for a very, very long time.
Visit -
Django Documentation
The Django documentation has been entirely refactored. It’s much more readable online, now. I like.
Visit -
The Python Property Builtin
Adam Gomaa explains the Python property built-in and some clever ways to use it with Django. I particularly like the caching-of-URLs suggestion at the end of the article.
Visit -
My first Django pluggable: django-mailfriend
I finally got the balls to put some of my code out there. This simple app allows for “e-mail this to a friend” functionality for any instance of any model in your Django database. If it sounds interesting, check it out. I’d love feedback. As you know, I’m a designer first, coder second, so I’m quite sure some of my code is not as optimal as it could be. Hopefully someone will find it useful.
Visit -
django-timezones
A pluggable app for working with timezones in Django. Looks very useful. Brian Rosner and James Tauber are definitely leading the pluggable app charge — both are putting out a lot of useful stuff. Thanks, guys. Via Simon.
Visit -
Django: Inserting and Positioning Images
Via Jacob, here’s a clever method for using Markdown to insert images into the content of a blog post, article, or whathaveyou. As Jacob notes, it’s similar to the concept of “inlines,” pioneered in Ellington, and later implemented in Nathan’s Basic Apps and my Savoy. It’s not as flexible as inlines (with inlines, you can insert any object, not just images, and you can access all attributes of your object, not just the file URL), but it’s a lot simpler, too. If you just need to plop images into a chunk of text, this will work great.
Visit -
Webmonkey: Build a Microblog with Django
A nice piece on Webmonkey about how to build a basic tumblelog with Django. The technique used is similar in concept (but a bit simpler) than what I’ve done here at jeffcroft.com. Note, though, that the Django signals bit in the article refers to the syntax for signals before a recent API change, so you’ll need minor changes to the code in the article to make it work with the current version of Django.
Visit -
Django 1.0 beta 1 released
I’ll be damned if it doesn’t seem like this whole Django 1.0 thing might actually happen. Be sure to read the release notes — there are several backwards incompatible changes (which are annoying, but it’s way better to get them out of the way before 1.0 than after it).
Visit -
Django file/directory name conventions
Although a good old
Visitmanage.py startappwill give you a very simple file stricture to get started with, there are a number of Django conventions that aren’t represented by it (and for good reason). For example, if you’re going to provide middleware with your app, it’s sort of accepted that you would store them inmiddleware.py. However, this isn’t documented anywhere, and it’s definitely led to a slew of projects existing on Google Code which don’t follow these conventions. This page, which was originally written in German and is being translated (sort of poorly) by Google, goes over the common file and directory names. It’s a good start at something I really think ought to be somewhere in the Django proper documentation. Sure, you can put name these files whatever you want, but having standard ways of doing things can only make things cleaner and more usable. -
This Week in Django
This Week in Django, which truly is one of the best podcasts I’ve listened to in any genre, has a new website. If you’re not already listening, you should be. Michael Trier, Brian Rosner, and Kevin Frivcovsky do a really, really great job. Honestly, it’s about the only Django resource I pay attention to. Being as design is my main focus, I don’t subscribe to many Django/Python blogs, I don’t really use the IRC channel, and I never read the Google Groups — and yet, I always feel like I know what’s going on with Django. That’s thanks in large part to TWiD.
Congrats on the new site, guys. It looks great.
Visit -
Nathan Borror: Creating a basic API with Django
Nathan shows how simple it is to create a basic REST API for an existing Django app, as he has done for his great new site, Readernaut.
Visit -
Open Web Podcast Episode 1
A new podcast featuring Dion Almaer, John Ressig, and Alex Russell. I don’t listen to a lot of web development podcasts (I tend to listen to more design-oriented stuff), but with that lineup, this is probably a must-listen.
Visit -
Brightkite API Documentation
For future reference. ;)
Visit -
Techworld interview with Guido van Rossum
Guido, Python’s creator and programmer God, has this to say about Django:
> Django is still my favorite — not only is it a pretty darn good web framework that matches my style of developing, it is also an exemplary example of a good open source project, run by people who really understand community involvement.
That’s a solid endorsement. Via Jacob.
Visit -
A solution for the “extends self” Django feature request
A few weeks ago, Nathan Borror and I were at Free State Brewery in Lawrencem talking about how it would be cool if a template could extend itself — that is to say, extend the same template at another path in the
VisitTEMPLATE_DIRSsettings. Overhearing us, Jeff Tripplett, Eric Holscher, and James Bennett had a few ideas, but no definitive solutions. Today, I found out that conversation ultimately sparked Daniel Lindsley to write a template tag that adds the functionality. Then, Django co-creator Simon Willison came along to detail yet another solution which can be achieved without additional code. It’s a bit “devious,” as Simon calls it, but it’s certainly clever and doesn’t feel particularly inelegant to me. I’m still looking forward to Daniel’s tag, but it’s great to know you can do this without it. -
GeoDjango, merged to trunk
GeoDjango is so far over my head that it doesn’t meant much to be, but I hear it’s awesome news, so I figured I’d link it up. :)
Visit -
“Default” templates in Django
Django’s templating system is one of its strongest points, in my opinion, and one of it’s coolest features it the “fallback” system used for locating templates. When used wisely, it can allow for a situation in which you can literally design an entire site by creating only one HTML file.
In Django’s
settings.pyfile, you configure yourTEMPLATE_DIRSvariable. This is simply a Python tuple representing filesystem paths to the locations your templates reside. For example:TEMPLATE_DIRS = ( '/home/jcroft/webapps/django/jeffcroft.com/templates2', '/home/jcroft/webapps/django/jeffcroft.com/templates1', )Here, we’ve got two directories containing templates:
Moretemplates1, andtemplates2. Whenever a Django app attempts to load a template, it will look in these two paths to find it. For example, if your blog application needs a template calledblog/entry_detail.html, it will first look for it in.../templates2/blog/entry_detail.html. If it’s not found, it will “fallback” to.../templates1/blog/entry_detail.html(if it’s still not found, Django will return an error.) -
Eric Florenzano’s Setting up a Django environment screencast
Eric’s got a terrific screencast about setting up a Django development environment on Mac. He goes through it step-by-step from the very beginning, and it’s all very easy to understand. There are a million different ways to set up your dev enviroment, but I really liked some of the things Eric was doing in his setup — it’s actually making me rethink the way I usually set mine up.
There’s also a screencast of Eric’s app django-pagination, which looks really sweet. I’m definitely going to look into it more and see if it’s appropriate for my projects. You should, too.
Visit -
Django signals
I found this great writeup of Django’s signals on Twitter today. Signals are an incredibly useful tool in Django, and one that is way under-utilized. I used them a lot back when I wrote the second version of lost-theories.com, and I use them a little bit in the Savoy content publishing framework I’ve written at Blue Flavor. I especially make great use of the pre and post save, and pre and post delete signals. Check ‘em out.
Visit
