No Gravatar

If you have ever looked for a book on the subject of Django templates, then a five minute search on the web will soon tell you that they are far and few between. In fact, you’ll most likely find that Django templating usually has a treatment taking up no more than a couple of chapters in an otherwise lightly related book.

Django 1.0 Template Development is virtually one of a kind on its subject matter and, therefore, necessarily covers the subject in sufficient breadth and depth. On that strength alone, the book should probably hold its place on any template author or web developer’s bookshelf for some time to come.

Keep reading…

  • Share/Bookmark

How the Web Sees Me

No Gravatar

Found an interesting article on the New Scientist web site yesterday about an MIT Musem exhibit called Metropath(ologies). In short the installation mines through data from a yahoo search and then builds a visual representation of that information as you wait.

Here’s what it did for me:

References

http://www.newscientist.com/article/dn17694-find-out-how-the-web-sees-you.html?DCMP=OTC-rss&nsref=online-news

http://personas.media.mit.edu/

  • Share/Bookmark

No Gravatar

I came across a problem recently when setting up some Fedora 8 Linux machine instances (AMIs) on Amazon’s EC2 service regarding the setting of the machine’s /etc/hosts file. The main issue was to get the host file to correlate the machine’s local IP address with its (new) host name. Seeing as the IP address was likely to be dynamic, I wanted to find a way of making sure that the current local IP was in that file each time the machine started.

Keep reading…

  • Share/Bookmark

No Gravatar

I am just putting a new development server together, using CentOS 5, and have come across the same headache as usual – managing standard and 3rd party rpm repositories and avoiding conflicts. I had forgotten about the excellent package yum-plugin-priorities, so here are some brief details on how to get started.

Keep reading…

  • Share/Bookmark

Pie Charts with MySQL

No Gravatar

Hey…

… want to know how to do this with MySQL?

+----------------------------------------------------------------------+
| pie_chart                                                            |
+----------------------------------------------------------------------+
|                                                                      |
|                         ;;;;;;;;;;;;;;;;;;;;;                        |
|                  oooooooo;;;;;;;;;;;;;;;;;;;;;;;;;;;                 |
|             oooooooooooooo;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;            |
|          ooooooooooooooooo                 ;;;;;;;;;;;;#####         |
|        oooooooooooooo                           ;#############       |
|       oooooooooooo                                 ############      |
|      oooooooooooo                                   ############     |
|      ooooooooooo                                     ###########     |
|      oooooooooooo                                   ::::::::::::     |
|       oooooooooooo                                 ::::::::::::      |
|        ooooooooo:::::                           ::::::::::::::       |
|          o::::::::::::::::                 :::::::::::::::::         |
|             :::::::::::::::::::::::::::::::::::::::::::::            |
|                  :::::::::::::::::::::::::::::::::::                 |
|                         :::::::::::::::::::::                        |
|                                                                      |
| ##  red: 1 (10%)                                                     |
| ;;  blue: 2 (20%)                                                    |
| oo  orange: 3 (30%)                                                  |
| ::  white: 4 (40%)                                                   |
+----------------------------------------------------------------------+

Look no further than here… Shlomi Noach is clearly a genius!

  • Share/Bookmark

No Gravatar

I was searching around this morning for a method of getting sunrise/sunset times into a set of python and bash scripts I am writing to control mains (240V) powered items. Imagine my joy therefore when a quick search on Google found me this: python-weather-api. It’s very simple to use as you shall see (I have pretty much reproduced the example from the sufficiently brief python wrapper documentation!)

Keep reading…

  • Share/Bookmark

No Gravatar

I have finally got round to installing TweetDeck on one of my Linux Fedora 10 systems. Whilst trying to run the Adobe Air Application Installer in order to install TweetDeck I kept getting the famous ‘Error #5100‘ code, and the install process would then crash out. It seems that the #5100 error code points to a range of unspecified problems to do with the filesystem (or at least that is my reading of it); problems such as disk space, permissions or lost files.

I got round this particular issue by running the Adobe Air App Installer from the command line, with root permissions. In this case it seems that the user trying to install the app did not have enough permission to do so. Here’s what I ran on the command line…

[lark:whatsit ]# /usr/bin/Adobe\ AIR\ Application\ Installer \
> /path/to/TweetDeck_0_21_5.air
  • Share/Bookmark

No Gravatar

Abstract
This seems to be a problem that a few people are experiencing these days when posting with apache hosted wordpress. The symptoms (in my experience) are as follows:

  • You write a post
  • Either a) preview the post, or b) publish the post
  • You get a ‘404′ error
  • Tracking back to the ‘posts’ page gives you a link to the draft/published post
  • Further attempts to edit always result in 404 errors

At this point you try and go back to edit the post and get more 404 errors. This problem seems to be particularly prevalent amongst those blogging on tech matters – using command line terms in their text.

Keep reading…

  • Share/Bookmark

No Gravatar

Abstract
Playing about with Django’s excellent admin interface this morning I came across a little problem that I am sure others will find if using Django in an SELinux environment. This concerns the ability to upload files to a server – in my case using Apache, mod_wsgi (not in daemon mode), and Fedora 10 with SELinux running.

Keep reading…

  • Share/Bookmark

No Gravatar

Outline

An interesting problem reared its head today regarding the inability of my Django setup to connect to a remote MySQL server. I have just migrated a Django site I am in the middle of working on from a single physical server to two virtual machines (VMs) running on a free copy of VMWare’s ESXi server; one Linux (call it VM1) running MySQL and the other Linux VM (call it VM2)  running Python and Apache.

Here’s what happened…

Keep reading…

  • Share/Bookmark