My Portable Travel Stick

This will be my last post from Taiwan, and I’m placing it in my tech section. Shortly I will be flying to Hong Kong, and then traveling into China. I’m not bringing my laptop with me. I’m always a little wary of using public computers, especially in many of the poorly run internet cafes. Often the logged in user is the administrator, and we all know the computers are obviously crawling with worms and keyloggers. What can I do?
Read My Portable Travel Stick

OpenMoko In Person

Two weeks ago I had the privilege of meeting up with some of the OpenMoko guys. You’ve seen me write a little bit about this project, but meeting them and actually getting to play with a device was quite enlightening. Most foreigners in Taipei take taxis, but not I. I already had an idea how to go to FIC headquarters, yet it was – rough. I jumped on the right bus, going the right direction, yet didn’t really know where to get off. In my broken Chinese I started talking to a group of high school kids, who somewhat pointed me in the right direction. At one point we were coming up to a light and a lady just said: “get off, go down that road.” I grabbed my bag and jumped off the bus. …
Read OpenMoko In Person

IIS7 GoLive Program

You can easily see that I am a big Linux fan, I’ve mentioned this over and over. I’ve also mentioned that I’m finishing up my MCSE, which started as a dare with my buddy, Ian. In the process of studying for my MCSE I’ve developed a certain amount of respect for Windows Server 2003, yet I’ll comment more on this later. What I really wanted to write two paragraphs about was an interesting discovery I made today. I happened to stumble over to Microsoft’s hardware site, and noticed in my little Server Spy monitor that it was running IIS/7 – the first time I have seen this anywhere. Upon further investigation I perused their GoLive program, which details several ways to test …
Read IIS7 GoLive Program

Computex 2007 Review

The buzz of Computex is finally wearing off, so I’ll finally scribe my account of the event. YS was kind enough to go with me, we actually called it a date. The scene was quite similar to the trade shows we saw last year, however there seemed to be fewer people. This might be because we went on the final day, although we suspect there weren’t that many people because there aren’t “sweet” deals to be had. Regardless, there were several main “halls” filled full of stuff. The first three (two were in one building) weren’t particularly interesting. I mean, there were some cool displays and lots of technology, but nothing that left me thinking “oh, that’s …
Read Computex 2007 Review

Liferea RSS in Liferea

Today on Linux.com, Liferea was mentioned I find this particularly because I’ve been using Liferea for quite a few months, and haven’t been able to find anything that better suits my needs. It sits quietly in the corner until a new RSS is available, and slightly changes color. Plus, it integrates wonderfully into GNOME. Well, the Linux.com article does a great job summarizing the reader, so if you are in the market, I’d take a look. For posterities sake, I took a screenshot of the Linux.com feed of Liferea, in Liferea.
Read Liferea RSS in Liferea

Turn Off Google Suggest in Firefox

I generally like Firefox, and generally like Google. But having Google suggest enabled when I search for things is annoying, at least on my rather small laptop screen. Mostly it is because my internet right now is pretty average, so I try to cut down on any extra traffic. Anyhow, I didn’t even both Googling how to do this: Type in ‘about:config’ into your address bar and type ‘search’ in the top filter bar. Look about half-way down for this:
Read Turn Off Google Suggest in Firefox

Adding Search to Django

This is fairly well documented in the Django docs, so I’ll be brief. This is the the bit of search code I use in almost all of my Django sites, and it works great: def search(request): from django.db.models import Q q = request.GET.get("q", "") if q and len(q) >= 3: clause = Q(dirtword__icontains=q) \ | Q(description__icontains=q) \ | Q(tags__name__icontains=q) site_search = Dirt.objects.filter(clause).distinct() else: site_search = Dirt.objects.order_by('?')[:100] return list_detail.object_list( request = request, queryset = site_search, template_name = "dirty/search.html", template_object_name = "dirty", paginate_by = 20, extra_context = {"q" : q}, ) …
Read Adding Search to Django

Django Syndication with Colddirt

Creating feeds in Django is freaking simple. I’ll start with an example of just updating a feed with the newest objects (for instace, newest blog posts). Similar to the forms.py way of handling our different forms, I’ve created a feeds.py to handle the feeds. from django.contrib.syndication.feeds import Feed from colddirt.dirty.models import Dirt class LatestDirts(Feed): title = "Cold Dirt" link = "/" description = "When you have dirt, you've got dirt. Right..." copyright = 'All Rights Unreserved' def items(self): return Dirt.objects.all()[:50] What this will do is query our Dirt DB and return an obj. The fields here are pretty well documented in the Django docs, …
Read Django Syndication with Colddirt

Django Syndication with Colddirt II

Since I’ve already covered a really simple syndication example, I’ll move onto something a little more complex. Let’s say you want to offer syndication that is slightly more custom. The Django syndication docs give an example from Adrian’s Chicagocrime.org syndication of beats. I had to ponder a minute to get “custom” syndication to work, so here’s my example from start to finish. First, as usual, feeds.py class PerDirt(Feed): link = "/" copyright = 'Copyright (c) 2007, Blog Mozaic' def get_object(self, bits): from django.shortcuts import get_object_or_404 if len(bits) != 1: raise ObjectDoesNotExist my_dirt = get_object_or_404(Dirt, slug__exact=bits[0]) …
Read Django Syndication with Colddirt II

Django Newforms Usage in Colddirt

I hear many complaints and questions about newforms, but I’ve personally found it rather easy and logical to use. There are numerous ways for you to use do forms in Django, and most likely the best way to see them all is to read the docs. On the Colddirt demo site, this is how I used newforms. I’ll take the index page as an example. I’ve accessed the newforms module like so:
Read Django Newforms Usage in Colddirt