Author Archives: James Lin

Useful Django Apps – TinyMCE & File Browser

TinyMCE https://code.google.com/p/django-tinymce/ Want to add WYSIWYG editor to your TextFields? This app will sort you right out, basically this app will provide a HTMLField for you to use instead of just plain TextField and it will automatically render a rich text editor for you. It does require some basic configuration, here is a sample config in… Read More »

Useful Django Apps – MPTT

https://github.com/django-mptt/django-mptt MPTT stands for Modified Preorder Tree Traversal, which really means for working with parent child relationships, this app will do some work under hood to make travelling the relationship much quicker and easier, such as some API methods like get_ancestors() etc. Some good usage example would be, category hierarchy, family tree etc.

Useful Django Apps – South

South A data migration tool, what it really means is if you change the data model and want to keep the data in there, you will need this app. At first I thought it’s tedious for early stage development when data isn’t important (why not just syncdb??), but once I realised it’s actually quicker to… Read More »

Installing Python Mysql Adapter On Mac OSX

First download and install mysql for Mac OSX Install virtualenv, create a virtualenv and activate it Pip install mysql-python, and you will see an error “EnvironmentError: mysql_config not found” Find the mysql_config by running “sudo find / -name ‘mysql_config’” Go to your /path to virtualenv/build/mysql-python Edit site.cfg Uncomment this line “#mysql_config = /usr/local/bin/mysql_config” and change… Read More »

Raspberry Pi home server

Bought this little device from rsonline UK, for about $60 with clear case including postage, took 2 weeks to get here. Bought an Apacer Micro SD 32gb class 10 from PBtech for about $58, you can get it cheaper from pricespy but I couldn’t wait any longer. I am a mac user so I used… Read More »

Internal SOA data transfer via memcache?

We have been working on a python/django project which is SOA oriented, all sites(systems) are internal and communications are done via http restful api requests. Our setup share the same set of memcache servers to cache data individually on each sub site(system). Often when site A wants data from site B, site A makes a… Read More »