Simple Ajax with Django

So, the Django developers, in my opinion, are freaking smart. Instead of bundling Django with a particular library, they have added XML and JSON serialization; us humble users can choose whatever AJAX library we want. Prototype 1.5.1 has been pretty fun to work with, so I’ll kick off this demo with a really simple example. How simple? The intended goal is to have the total number of ‘dirts’ update without user intervention. Laaaammmeee. If you are a visual type of person, take a look on the Colddirt huh page. That number automatically increases without user intervention. And this is how. The process (some pseudocode) will go like this:
Read Simple Ajax with Django

Colddirt Information

Note: Colddirt’s source code is run from Django SVN, check out on May 10th-ish. If you are using a newer branch, some things have changed. i.e. clean_data has been renamed cleaned_data. Remember to check the BackwardsIncompatible page in the wiki. Part 1: Simple AJAX with Django Part 2: Django Newforms Usage Part 3: Search with Django Part 4: Django’s Syndication Framework (simple) Part 5: Django’s Syndication Framework (little more complex) Feel free to see the source code from Github.
Read Colddirt Information

Ubuntu Upgrade

Having been in I.T. for quite a few years, upgrading can sometimes be quite a hassle. Having switched to Linux for many years, the crazy upgrade madness of windows is gone. So, how easy is upgrading in Linux? Yea, pretty darn easy, I must admit. And my system certainly isn’t normal! It has been an upgrade from Debian Sarge(ish) -> Ubuntu LTS(ish) -> 6.10 -> 7.04… The only hiccup was at some point when the fonts were reinstalling (I totally ignored the “close all programs” warning:
Read Ubuntu Upgrade

Bare-metal Restore

As you can see by my previous post, my question to squeeze more req/sec from the server, I decided to try out Gentoo (again, last time was four years ago). Now, I like Gentoo, there is no doubt about that. However, I realized things took just too long to get set up. I guess that is the disadvantage of a source based package management tool. Back to Debian I go.
Read Bare-metal Restore

The Gentoo test

I have a love-hate relationship with Linux. I love it because if there is a problem, I can actually tinker and find the problem and fix it. But I hate it because I like to tinker. Recently I’ve been doing a fair amount of Django programming – enjoying every minute of it. After completing several of my projects I decided to do some benchmarks, and the results are in! Generally I can server cached/semi-cached pages at about 200req/sec. 200req! Considering this is 5,000,000 or so requests a day, and a number I am never going to reach, I still began to wonder: why isn’t it higher? I mean, serving a static html page is at like 1000+ req/sec, so why would a cached page be significantly different? I …
Read The Gentoo test

Django SVN Update Goes Splat

I’m writing this just in case somebody runs into this same issue. I’m about to go live with a website and figured it would be best to have the latest SVN snapshot checked out from Django. I updated, and noticed that my voting module didn’t quite work as expected. I was getting the following error: 'module' object has no attribute 'GenericForeignKey' I jumped into Trac and noticed that just yesterday some things were rearranged. In short, if you are using generic relations, you’ll need to change two parts of your code. First, the generic relations field must be imported out of conttenttype.
Read Django SVN Update Goes Splat

PSAD and Syslog-NG

I really like using PSAD, both on my server and my laptop. You never know where the mean people are. I also seem to use syslog-ng quite often, meanwhile PSAD seems oriented to syslog. This is fine, and I’m pretty sure the install.pl for the source built will configure syslog-ng.conf automatically. However, I almost always tend to stick with packages if I can – if they are even remotely close to the current version. Anyways, if you need to get syslog-ng.conf configured for PSAD, this is what you need to do: Add this code to the “# pipes” section, maybe stick to keeping it alphabetical.
Read PSAD and Syslog-NG

A Dying Laptop

I have the pleasure of owning an old T23 laptop. To show you how old this puppy is, the current T series is at T60, and those have been out for over a year. This laptop was made in 2012, and I picked it up somewhat discounted late in 2003. It is now March 2007, and this puppy is still rock solid.
Read A Dying Laptop

One More Point Linux

It should come as a surprise that I enjoy using Linux. For the record, the first time I booted into Linux on my own was 1997, this was just before entering high school. So, while some of my tech friends played with NT, I was rumbling with the Penguin. Starting in 2000 I was using Linux as my main operating system, sometimes supplemented by OS X, and only using Windows when the gaming urge surfaced. In 2004 I mostly dropped playing any games, which resulted in dropping Windows – and besides for work, I haven’t used it since.
Read One More Point Linux

The Risk in Risk Mitigation

Back in the day the barrier to entry for the Internet was quite high. The technology used required a steep learning curve, the equipment extremely expensive, and sometimes even hard to acquire. Fast forward to 2007 and things have certainly changed. If you know any tech people you can likely get free hosting for a small website, and even more demanding websites can be hosted for not much. The cost of dedicated servers has dropped even more. And the final kicker: web services. I’ve started to think of some web services not as a service, but more like outsourcing requirements.
Read The Risk in Risk Mitigation