Skip to main content


Showing posts from 2013

Dropbox on Linux Mint 15

I noticed on Linux Mint that the Dropbox icons and menu options don't appear in my Dropbox directory. I did a little research and this is because by default when you install Dropbox it'll assume you're using Nautilus as your file browser, but by default Linux Mint uses Nemo (which is a fork of Nautilus).

Luckily it's an easy fix:
sudo apt-get install nemo-dropbox

Then quit all running instances of Nemo:
nemo --quit

When you open up your Dropbox directory again you'll see the familiar Dropbox icons.

FreeTDS on Linux Mint 15

If you're trying out or moving to Linux Mint and you're used to setting up FreeTDS on Ubuntu, you'll find that things are just slightly different on Mint.

Quick and easy fix:
sudo apt-get install freetds-bin tdsodbc

Also note that in a different place on Mint than on Ubuntu, so instead of it being located at /usr/local/lib/ it'll be here:

Generating CSV Files in Django






Custom Managers in Django


Here's the Django models for Registrant and Sponsor:



django-stdimage Custom Fields and South Migrations

I'm putting the finishing touches on my latest Django site (a registration site for a dog rescue charity walk) and part of the functionality is the ability for users to upload photos. Since most people will simply snap a photo on their cell phones and upload it, and since cell phones these days take some pretty large pictures, I want to resize the images to a standard size of 800x600 when they're uploaded and also create a thumbnail.

As with most things in the Python/Django world there's a library that does exactly what I need, specifically django-stdimage, which provides a custom model field to handle resizing photos and creating thumbnails.

After installing django-stdimage via pip, updating my model class to use the new form field, and then doing a South migration, I ran into this error:

 ! Cannot freeze field ''
 ! (this field has class stdimage.fields.StdImageField)

 ! South cannot introspect some fields; this is probably because they are…

Downloading from eMusic on Linux

eMusic is an excellent, long-standing digital music store and one I've been a member of for years, but to say they aren't friendly to GNU/Linux would be putting it mildly. They used to have an official (in permanent beta, but still) download manager but they've since done away with it so there is no official way to download music from eMusic on GNU/Linux.

Since I do some other audio/voiceover stuff on Windows it wasn't a huge deal for me to suck it up and download from eMusic on Windows, but that has since stopped working for no apparent reason. I click download, the download manager pops up, and nothing happens. Perhaps not coincidentally this is precisely the time the Google Music Manager stopped working as well, and also when my Windows Media Center PC stopped downloading guide data. Methinks a Windows patch of some sort borked all this stuff in one fell swoop but I'd rather not be using Windows anyway so I took it as a wake-up call.

Thankfully there's an un…

Generating and Sorting on a Transient Property in a Django Model Class

I ran into an interesting little issue in a Django application today that led to what I thought was some pretty powerful stuff in Python and Django that I hadn't had to use before, so I thought I'd share.

I'm working on an application that to keep it generic I'll simply say deals with requests from users, and these requests require various levels of approval depending on the type and severity of the request.

Here's a basic Django model class that contains the fields relative to this example:

Basic stuff so far.

Where the wrinkle comes in is there is a page in the application that lists the requests ordered by date, but the date by which each request will be displayed and sorted depends upon the impact of the request as follows:
minor: use datetime_supervisor_approvedmajor: use datetime_admin_approvedsevere: use datetime_president_approved To state the issues succinctly:
The date on which I want to sort varies for each requestI don't want to store an additional, r…

Installing and Configuring NextPVR as a Replacement for Windows Media Center





Setting Up Django On a Raspberry Pi



General Comments and Assumptions
