Mavericks + Django

As I’m changed work a few times the past few years I’ve had to get a Django install up and going on each new machine I’ve used. Here’s a quick run through to get a local development environment for Django up and running in Mavericks in no time. First off, we need install pip so we can get the other packages we need. sudo easy_install pip We’ll want to use virtualenv so we can have multiple Django versions and python environments.…

Chrome 30 Breaks FKCeditor

Recently at work I had a perplexing issue. One of the knowledge workers’ browser suddenly stopped loading the FCKeditor in Magento. It was weird because myself and everyone else who used the administration side of Magento was able to edit pages and products just fine and have the editor load up no problem. At first I though it might be a javascript issue or something but that was working fine everywhere else.…

Spree on Webfaction

A few months back on went on a search for the next best e-commerce framework. Of course only open source will do and while I really like the Cartridge plugin for Mezzanine to say Cartridge is in it’s infancy is an understatement. But other than Satchmo (who’s ship seems to have sailed) there aren’t really any good options from the django side. You’re pretty much left rolling your own. I wanted something pretty complete out of the box.…

Deploy with Fabric to Webfaction

For the past few years I’ve been deploying my Django projects to Webfaction with Fabric. Fabric is an amazing tool very similar to Capistrano for Rails that allows you to run a series of shell commands in sequence. While this is going to be a simple example of Fabric usage, it shows how it can save time. Let’s look at a typical Django project that you’ve been developing and its now live in production and you make some changes to your stylesheet.…

Setup Rails + Spree on Mac

I wanted to setup Spree locally on my Macbook but the directions on their site didn’t work. At all. Here is how I got it installed and working. Install RVM + Rails (poor mans rails installer) \curl -L https://get.rvm.io | bash -s stable --rails I found the documentation at https://github.com/spree/spree to be more specific. When I tried to install using the tutorial documentation it failed due to it installing Rails 4 which the Spree it installed was not compatible with.…

rsync

Today I needed to move a ton of static media files over to a new server (we’re switching hosts at work.) In this case we previously had some of the large media files on a CDN that we’re moving away from and these files I now need to host on the same server as the rest of the stuff. Only problem is there is over 3,000 files and many of them large videos and images.…

Homebrew

I started building sites with Django in 2008 and it’s a little crazy to look back and see the improvements and growth that Python and Django has experienced in that time. Remember trying to install everything with Macports? Environments were a beast to deal with. Then a few years ago Homebrew came along and its now pretty much the first thing I install on a new Mac to start setting up a local dev environment.…

MAMP vhosts

Today I had the joy of installing an old Magento version on my local MAMP setup. Most everything went well. I first tried to install the old sample data with it but the download that was available was obviously not correct, resulting in tons of SQL errors. So I decided to just install it clean with no sample data. Everything went fine until I tried to log into the admin and PHP can’t store the session into a TLD like localhost, so it was time to fire up some virtualhosts with period in them so that Magento can work, cause……

Magento

Anyone who knows me pretty much knows I don’t hold much love for Magento. I respect the system and even more so the business the founders made by creating Magento, but every time I’ve worked with it, I just couldn’t shake the feeling that this should be simpler. A LOT simpler. I remember first hearing about Magento in 2007 when I worked at iFrogz and at the time it was the first full featured cart that actually looked decent.…

Django Sort Dropdown

Recently while working on PrinceJets I found I really needed to filter a drop down on a ForeignKey relationship. I found a way to do it in the Django documentation but it said not to use it for queries that returned over 100 results but my model was regions which were linked to countries and then continents. In short I had thousands of records to sort through. Uggh, it should be simple, but it wasn’t.…