-
Using Paypal with Django
Great tutorial on setting up PayPal transactions with Django. This may come in handy if we put up a merch shop for the Blue Flavor Secret Project™. :)
Visit -
Django’s URL template tag sucks
I don’t like Django’s
{% url %}template tag, and I’m about to tell you why. But first, let’s have a little history lesson so we understand why the{% url %}tag exists and what problem it attempts to solve.I’ve been involved in Django since the .90 release, or nearly three years. As long as I’ve been working with Django, there’s been a convention which basically says that any model whose instances are represented by a page on the site should get a method called
get_absolute_url, which returns the relative URL to that instance’s page (for now, please ignore the fact thatget_absolute_urlis misnamed and actually returns a URL relative to the root of the site).In the early days, the
Moreget_absolute_urlmethod for a blog entry might have looked like this… -
Django Days
A new site dedicated to all things Django.
Visit -
django-reversion
Another approach to version controlling the content in your Django database. This one looks remarkably good, at a glance. It stores revisions in the database, rather than an external version control system, and can be added to an existing project with just a few lines of code (and no modifications to your existing models). Looks very slick. I only have one question: what happens when you make a schema change to a versioned model (i.e. add/change/delete a field)? I’m going to assume this would render the versioned content unusable, but I’m not sure about that. Anyone know?
Visit -
Big list of Django tips (and some python tips too)
My man Eric Holscher drops some Django and Python knowledge on your asses. A lot of good stuff, here. Check it out.
Visit -
Nathan Borror: Save RAM with mobile middleware
Nathan shows you how you can use a middleware to manage different templates between two versions of a Django site (such as a desktop and mobile version) without having to run a separate mod_python/mod_wsgi configuration, thus saving you RAM. Nice.
Visit -
django-faq
Kevin Fricovsky released this reusable FAQ application for Django. Perhaps even more interesting than a useful FAQ application, it’s a great example of an app that has been built to be as reusable as possible. I’m wanting to refactor Savoy to be as reusable as possible, so this is a terrific example. Good stuff, Kevin!
Visit -
DjangoCon 2008: Pinax
James Tauber’s talk about Pinax at DjangoCon is a really great look at Django’s killer feature: reusable apps. Pinax is basically a collection of reusable apps — some of which were built for Pinax, and others which are independent of it — that allow one to put together a site very quickly (especially if your site is centered around social networking, as that’s much of what Pinax provides at this point). The basic concept is to separate bits of functionality (friend relationships, commenting, tagging, voting, registration, etc.) from what James calls the “domain object.” The domain object is what makes your site unique. For flickr, it’s photos. For Newsvine, it’s news stories. For Cork’d, it’s wine. If Pinax can provide all the non-domain object bits, all you have to do it build your domain object, and you’re set. Even if you’ve no interest in writing Django apps, it’s a good discussion of modularity and how this stuff works when it’s done right.
I was also surprised and excited to see that the approach I’ve taken with Savoy. While Savoy is more content management oriented (and Pinax is more focused on social networking), the basic structure of the two projects is very similar. Savoy has a set of third party apps it pulls in, as well as a set of “core” apps that are required. On top of that are “contrib” apps that are all optional. So, you simply install the core apps, then pick and choose which contrib apps are appropriate for your project, and you’re off to the races. I’m working to make all of these apps as reusable as possible. This is an ongiong process, and chances are the first will release won’t be as reusable as I’d like. But, pluggability will always be a primary goal. Finally, you can of course run your own apps alongside Savoy’s apps. Some apps even have hooks to integrate your own apps where appropriate (for example, the aggregator app, which runs my tumblelog, will aggregate content from any model of your choice, not just those that Savoy itself provides).
If you’re interested in building a social sort of site, or how best-of-breed reusable Django apps are built, definitely check out Pinax, and James’ talk about it.
Visit -
10 Insanely Useful Django Tips
Glen Stansberry writes on Django for NETTUTS. Nice. Django is really getting a lot of run lately!
Visit -
This Week in Django 38
The latest episode of TWiD has a great interview with Leah and Mike of Pownce. If you’re interested in scaling and how a high-traffic, high-profile site run on Django, do check it out.
Visit -
Presenting django-recommender
Uses fancy-schmancy algorithms to figure out recommendations for things based on votes (from django-voting) and tags (from django-tagging). Looks interesting.
Visit -
Introducing the Django Debug Toolbar
One of the most useful third-party Django apps yet!
Visit -
Django’s release process
Now that 1.0 is out the door, the Django team has put together a release process document. Looks good to me.
Visit -
django-grappelli
Impressive-looking skin for the Django admin interface.
Visit -
WDS08: Workshop Day One: Django-a-gogo!
Michael McCorry came to my Web Directions workshop and was kind enough to write up a mini-review on his blog. Awesome. Thanks, Michael — was great meeting you!
Visit -
Django From the Ground Up: Episodes 1 and 2
E-Flo is at it again with a pair of really, really good screencasts that take you through setting up a Django project from the very beginning. He is building a real live site (a sort of Twitter clone with a twist), walking you through it from step one (you can also download then entire source of the site). The first two episodes cover getting your source control environment set up, getting Django’s settings.py file all configured, and then creating the models. Really, really good stuff here, if you’re looking to learn Django.
Visit -
django-rcsfield
A Django custom field type which, in the background, stores and revisions its content in SVN or BRZ (more backends on the way). Haven’t tried it, but the code looks clean and the API is nice and Djangonic (new word? I like it.). Very cool stuff. I’d love to be able to store website content in version control on the fly.
Visit -
Reasons not to use django
The good news about this post is that all of the reasons mentioned are either a distaste for bits you can swap out for your favorite (ORM, template language), or things that are planned for Django 1.1 (aggregate support). Well, except for the guy who complained that Django doesn’t allow him to make very much money, since he charges by the hour. :)
Visit -
DjangoCon 2008 Panel: Django in Journalism
Moderated by Adrian Holovaty, panelists Matt Waite (St. Petersberg Times), Maura Chace (Atlanta Journal-Constitution), Matt Croydon (Lawrence Journal-World), and Ben Welsh (Los Angeles Times) discuss Django and journalism at DjangoCon. Really good stuff here. The discussion ranges from what’s great and not-so-great about Django in a newsroom to the general decline of the newspaper industry to how to get the “pointy-haired bosses” at traditional media organizations to buy into something other than the “pageviews equals dollars” worldview that is helping to destroy serious journalism in favor of photos of Lindsey Lohan. Really good talk.
Visit -
This Week in Django: Discussion with Eric Holscher
I’ve recently had the pleasure of hanging out with Eric a few times, and I’ve gotta say: he one cool dude. Super nice, super chill, and super smart. Here, he talks with Kevin Fricovsky about several things Django, including his awesome work in Django testing and debugging and his new day job at World Online in Lawrence (for the sake of disclosure, Eric was not at World Online when I was). Good stuff.
Visit -
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 -
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 -
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 -
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 -
Capital Radio
Wonderful radio station site from the talented team at GCap. Really nice from the bottom up — Django-based CMS, nice design, good content. I dig it. Congrats to Simon Willison, Robert Lofthouse, and whoever else was involved in this one.
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 1.0 release party
Django 1.0’s release party will be at the Tied House in Mountain View on Saturday, September 6th at 7pm. I totally wish I could be there. Don’t feel sorry for me, though — I’ll be trying to find some hot karaoke action in London at the time. :)
Visit
