Posts tagged: WEB DEVELOPMENT

Notes on my new Django setup

My personal record of using revision control for source code has been pretty spotty. Today I took steps toward fixing that by working out a system for managing my Django projects. I wanted revision control (Subversion), I wanted Django’s “runserver” for development and mod_python for deployment, and I didn’t want it to be a pain. Some highlights of the process: I used my pastebin site as the test mule. I checked in the current live site’s source code, created “trunk”, “tags”, and “branches” directories per the Subversion manual, and checked out a copy of the trunk into a staging directory.

Handling legacy URLs with Django

One of the great things about Django is its simple and flexible URL handling. If your Django work, like mine, includes converting existing sites, you’ll probably be doing some URL cleanup along the way. Django’s “generic views” system includes a view called “redirect_to” that handles cases like this. A rule might look like this: urlpatterns = patterns('django.views.generic.simple', ('^foo/oldsite/BadOldUrl33247.blech$', 'redirect_to', {'url': '/bar/nice-new-url/'}), ) But because the URL pattern building happens in Python, if you have many of these you can do better than filling your urls.

Think twice before you let those domains lapse

In an effort to shed time-sucking side projects in the past couple years I’ve let a number of sites go dark and domain names lapse. Some of these were ideas that never got off the ground, but one or two were sites with real traffic and Google pagerank (PR 5 in one case, not stellar but not achievable overnight either). Sadly, some of these domains have now been taken over by those useless squatter pages that manufacture lists of “related links” and “popular searches” and so on to trick people into clicking on ads.

SourceForge needs help

Despite their adoption of Big Green Download Button technology, SourceForge still has an absurdly cumbersome download process. I know it’s annoying to just gripe (I try to see the positive side too); I’m just surprised that it’s still this crufty. According to the OSTG site, “SourceForge.net hosts more Open Source development products than any other site or network worldwide.” But if the pace of modernization doesn’t pick up, I’m afraid that won’t be true for much longer.

Root, sweet root

For several weeks at work I’ve been prepping for a server move; this week we flipped the switch. It was the most serious migration I’ve ever done, and it went very well. Some notes: Previously we shared a dedicated box at a certain very large colo provider. A few weeks ago, in the course of swapping out a failing drive in our box, staffers at the colo 1) wiped out the live backup of the drive and then 2) destroyed the contents of the failing drive, overwriting it with a week-old backup.

Trying to send eBay a message?

I’ve been getting unrequested messages from the eBay Developer Zone site over the last couple days about email address changes. I have a Developer Zone account, but I haven’t touched it for months if not longer. I sent an e-mail to them about it, but haven’t heard anything. I just got yet another one of these and I think I see what’s up. Check out the registered email address. Somebody found a hole.

Web developer evolution

After the frameworks post I kept thinking about this. Of course any generalizations I make are heavily colored by my own direct experience, but the progression seems to go along these lines: Make static web pages. Make modular pages using simple includes (in SSI, PHP, ASP, or what have you). Make pages with more involved functionality (form submissions to database, basic CRUD). Get sick of re-building dynamic stuff for every project; write your own kinda portable library or framework.