How many times did you have to stay up late at night to patch your framework ?
Rails: numerous code execution and SQL injection vulnerabilities reported over the years.
Django: no code execution or SQL injection vulnerabilities reported.
* Python [1,2] : 20 + 15 = 35
* Ruby [3,4] : 31 + 8 = 39
* PHP [5] : 336
Ouch :(
[1] http://www.cvedetails.com/product/2147/Python-Software-Found...
[2] http://www.cvedetails.com/product/18230/Python-Python.html?v...
[3] http://www.cvedetails.com/product/12215/Ruby-lang-Ruby.html?...
[4] http://www.cvedetails.com/product/3861/Yukihiro-Matsumoto-Ru...
[5] http://www.cvedetails.com/product/128/PHP-PHP.html?vendor_id...
edit:formatting
Presumably a fairer comparison would compare (Python + Django) with (Ruby + RoR) with PHP?
It's safer to only use vulnerability counts as a metric for how interesting software is to security researchers.
* Rails: http://www.cvedetails.com/product/22568/Rubyonrails-Ruby-On-...
* Django: http://www.cvedetails.com/product/18211/Djangoproject-Django...
* CodeIgniter: http://www.cvedetails.com/product/11625/Codeigniter-Codeigni...
* Top 50 Products (Better stop using these too! /s): http://www.cvedetails.com/top-50-products.php