How to set up a Django friendly development environment on a Mac

     

Needless to say that ever since I bought my MacBook Pro, I don't develop on my desktop computer anymore. A DVI cable goes straight into my 26" wide screen monitor and I have all the power in the world.
jEdit was for awhile my editor of choice. It has a nice layout, secure ftp client and supports all the languages I need. The down side is it eats up too much memory and crashes quite often.

Not too long ago I tried TextMate and I was absolutely in love with it. TextMate is a very clean and fast editor and it doesn't have FTP client bundled with it. It integrates quite well with CyberDuck and Transmit but I even found an easier way to edit files remotely.

FUSE (File System in User Space) allows you to implement a fully functional filesystem in a userspace program. Not too long ago, the folks at Google created MacFUSE for Mac OS X 10.4 and above.

The first step of setting up the environment is to download the core macfuse files from here. Once you have that, it is time to set up our SSHFS. This is a filesystem client based on the SSH File Transfer Protocol. Since most SSH servers already support this protocol it is very easy to set up: i.e. on the server side there's nothing to do. On the client side mounting the filesystem is as easy as logging into the server with ssh.
You can grab the sshfs client from here. There is one more thing I had to do before I was able to connect. On your dev box make sure you allow sftp.
Edit /etc/ssh/sshd_config and make sure this line is uncommented.

Subsystem sftp /usr/libexec/sftp-server

At this point you should be able to mount your remote fylesystem and open files with TextMate.
I was lucky enough to find the GetBundle bundle by Sebastian Gräßl.

  1. Download the bundle and install it.
  2. In TextMate go to Bundles->GetBundle and select Django and Django Templates from the drop down list.
  3. Enjoy the autocomplete when writing Django models and templates :)

3 Responses to “How to set up a Django friendly development environment on a Mac”

  1. Michael Trier Says:

    I've been enjoying your series of articles. Thanks so much. Regarding this post, I'm curious why you're not just using subversion or something similar?

  2. Free Directory Says:

    Thanks for the tips. jEdit is definitely my top choice too. :-)

  3. Umut Says:

    I generally use TM for my ruby on Rails projects, also i paid for it. When it comes to use IDEs honestly i don't really like them because there have slow response times. BBEdit is also good editor for mac and it has build in FTP, SFTP and SVN client. As Michael said nice post thank you.

Leave a Reply