Quantcast
Channel: Alan Edwardes
Viewing all articles
Browse latest Browse all 25

Redesign Again

$
0
0

I seem to keep doing this about twice a year, but I've redesigned again. I made it so certain posts can have animated slideshows behind their title, which makes for a pretty cool looking page.

Live Search

The search box to the right is now a "live" search - you type, it finds. I was using the Google Ajax Search API before because I was on the App Engine, and you can't do LIKE queries on their bigtabe setup.

Implementing something like this in Django was pretty easy, I just wrote a JSON backend that basically gets data from this query:

Post.objects.filter(Q(title__icontains=query) | Q(body__icontains=query)).order_by('-published')[:25]

Which is nice. All pretty Python too.

Having a Mint

I also decided to install Mint again, as I missed having instantly updated stats. Getting nginx to pass requests from / to Python and /mint/ to PHP is pretty simple too:

location / {
	# Python FastCGI stuff
}
location ~ /mint/.*\.php$ {
	fastcgi_pass   php-flup-server:port;
	fastcgi_param  SCRIPT_FILENAME  /path/to/mint$fastcgi_script_name;
	include fastcgi_params;
}
location /mint {
	alias /path/to/mint/mint/;
	index index.php;
}

I will post more, honest!


Viewing all articles
Browse latest Browse all 25

Trending Articles