<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<title>Ask The Pony - blog about scalable Django apps, improve django performance, how to make Django faster | Ask The Pony</title>


<script src="/cdn-cgi/apps/head/T_ACsydujXGDV-HYAuhq1yGZPv0.js"></script><link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="https://feeds.feedburner.com/asktheponyblog">
<link rel="shortcut icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="pingback" href="https://www.askthepony.com/xmlrpc.php">

<link rel="stylesheet" type="text/css" href="/wp-content/themes/freshserve/BLOG_ALL.css" media="screen">
<style type="text/css">
    .SB1#text-3 {
      display:none;
    }
    #page {
	position: relative;
    }
    .page_sidebar_wrapper {
	position: absolute;
	width: 245px;
	right: 55px;
    }
    .page_sidebar {
	position:absolute;
	width: 245px;
    }
    .page_sidebar.fixed {
	position:fixed;
	width: 245px;
    }
  </style>

<script type="text/javascript" src="/wp-content/themes/freshserve/javascripts/BLOG_ALL_v1.min.js"></script>


<link rel="alternate" type="application/rss+xml" title="Ask The Pony » Bits about Django performance, scalability and deployment Comments Feed" href="/blog/feed/">
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://www.askthepony.com/xmlrpc.php?rsd">
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://www.askthepony.com/wp-includes/wlwmanifest.xml">
<link rel="index" title="Ask The Pony" href="https://www.askthepony.com/">
<link rel="next" title="About" href="/about/">



<link rel="canonical" href="/blog/">

<style type="text/css" id="syntaxhighlighteranchor"></style>
</head>
<body>
<div id="consider1" style="text-align: center; width: 100%; background-color: #222222; z-index: 1000; box-shadow: black 1px 1px 10px; color: #aaaaaa; position: fixed; display: none; height: 26px; padding-top: 6px;">
<p id="step-one" style="position: absolute; width: 100%; top: 8px;">Not bad?</p>
<p id="step-two" style="display: none; position: absolute; width: 100%; top: 6px;"><span style="margin-left: 4px; position: relative; top: -5px;"> </span></p>
<p id="step-three" style="position: absolute; width: 100%; top: 8px; display: none;">Thanks!</p>
</div>
<div id="header">
<div class="page">
<div style="width: 364px; height: 80px;"></div>
<ul>
<li class="page_item page-item-2 current_page_item"><a href="/blog/" title="Weekly Django bits from the team" style="border-top-left-radius: 6px 6px; border-top-right-radius: 6px 6px; border-bottom-right-radius: 6px 6px; border-bottom-left-radius: 6px 6px;" onclick="_gaq.push(['_trackEvent', '/blog/', 'Blog menu link']);">Blog</a></li>
<li class="page_item page-item-19"><a href="/about/" title="About">About</a></li>
</ul>
<div class="clear"></div>
</div>
</div>
<div id="page" class="right_sidebar">
<div class="top"></div>
<div class="content">
<div class="header page">
<h1>Bits about Django performance, scalability and deployment</h1>
</div>
<div id="blog" class="padding">
<div class="page_content">
<div class="post" id="post_id_179">
<h1><a href="/blog/2011/08/fabric-script-to-deploy-minified-combined-and-otherwise-optimized-media/">Fabric script to deploy minified, combined and otherwise optimized media.</a></h1>
<span class="meta">Posted by tkopczuk on August 3, 2011</span>
<div class="content">
<div class="blog_img"><a href="/blog/2011/08/fabric-script-to-deploy-minified-combined-and-otherwise-optimized-media/"><img width="584" height="150" src="/wp-content/themes/freshserve/scripts/timthumb.php?src=http://www.askthepony.com/wp-content/uploads/2011/08/imadlo.jpg&amp;h=150&amp;w=584&amp;zc=1" /></a></div>
<p>Fabric deployment script with a feature to automatically combine and minify js/css files and losslessly optimize images for a nice UX gain. S3 automated upload feature with a tweak to make it serve gzipped files.</p>
</div>
<div class="read_more"><a href="/blog/2011/08/fabric-script-to-deploy-minified-combined-and-otherwise-optimized-media/" class="button"><span>Read More</span></a></div>
<a href="/blog/2011/08/fabric-script-to-deploy-minified-combined-and-otherwise-optimized-media/#comments" title="Comment on Fabric script to deploy minified, combined and otherwise optimized media."><span class="dsq-postid" data-dsqidentifier="179 http://www.askthepony.com/?p=354">6 Comments</span></a>
<div class="clear"></div>
</div>
<div class="post" id="post_id_174">
<h1><a href="/blog/2011/07/setup-a-complete-django-server-deploy-rollback-%e2%80%93-all-in-one-powerful-script/">Setup a complete Django server, deploy, rollback &ndash; all in one powerful script.</a></h1>
<span class="meta">Posted by ymirpl on July 25, 2011</span>
<div class="content">
<div class="blog_img"><a href="/blog/2011/07/setup-a-complete-django-server-deploy-rollback-%e2%80%93-all-in-one-powerful-script/"><img width="584" height="150" src="/wp-content/themes/freshserve/scripts/timthumb.php?src=http://www.askthepony.com/wp-content/uploads/2011/10/fabric.jpg&amp;h=150&amp;w=584&amp;zc=1" /></a></div>
<p>Keep the upper hand in Django deployment.<br />Set up a complete Django production server using just one console command (nginx+gunicorn under supervisord, PostgreSQL).<br />Deployment with complete versioning and quick rollback to any of the previous versions. Different settings for different server groups (with setup, pre- and post deployment scripts).</p>
</div>
<div class="read_more"><a href="/blog/2011/07/setup-a-complete-django-server-deploy-rollback-%e2%80%93-all-in-one-powerful-script/" class="button"><span>Read More</span></a></div>
<a href="/blog/2011/07/setup-a-complete-django-server-deploy-rollback-%e2%80%93-all-in-one-powerful-script/#comments" title="Comment on Setup a complete Django server, deploy, rollback &ndash; all in one powerful script."><span class="dsq-postid" data-dsqidentifier="174 http://www.askthepony.com/?p=293">3 Comments</span></a>
<div class="clear"></div>
</div>
<div class="post" id="post_id_167">
<h1><a href="/blog/2011/07/getting-django-on-heroku-prancing-8-times-faster/">Getting Django on Heroku prancing 8 times faster.</a></h1>
<span class="meta">Posted by tkopczuk on July 18, 2011</span>
<div class="content">
<div class="blog_img"><a href="/blog/2011/07/getting-django-on-heroku-prancing-8-times-faster/"><img width="584" height="150" src="/wp-content/themes/freshserve/scripts/timthumb.php?src=http://www.askthepony.com/wp-content/uploads/2011/07/heroku-pony.jpg&amp;h=150&amp;w=584&amp;zc=1" /></a></div>
<p>Deploying Django and gunicorn with multiple workers on a single free Heroku node.<br />Combined with an external PostgreSQL instance coupled with connection pooling, it gives a massive 8x speedup.</p>
</div>
<div class="read_more"><a href="/blog/2011/07/getting-django-on-heroku-prancing-8-times-faster/" class="button"><span>Read More</span></a></div>
<a href="/blog/2011/07/getting-django-on-heroku-prancing-8-times-faster/#comments" title="Comment on Getting Django on Heroku prancing 8 times faster."><span class="dsq-postid" data-dsqidentifier="167 http://www.askthepony.com/?p=175">15 Comments</span></a>
<div class="clear"></div>
</div>
<div class="post" id="post_id_100">
<h1><a href="/blog/2011/07/django-and-postgresql-improving-the-performance-with-no-effort-and-no-code/">Django and PostgreSQL &ndash; improving the performance with no effort and no code.</a></h1>
<span class="meta">Posted by ymirpl on July 8, 2011</span>
<div class="content">
<div class="blog_img"><a href="/blog/2011/07/django-and-postgresql-improving-the-performance-with-no-effort-and-no-code/"><img width="584" height="150" src="/wp-content/themes/freshserve/scripts/timthumb.php?src=http://www.askthepony.com/wp-content/uploads/2011/07/postgresql-1024x351.jpg&amp;h=150&amp;w=584&amp;zc=1" /></a></div>
<p>Improve your Django and PostgreSQL application performance by using connection pooling. No coding and virtually no effort required for 2 times better response times.</p>
</div>
<div class="read_more"><a href="/blog/2011/07/django-and-postgresql-improving-the-performance-with-no-effort-and-no-code/" class="button"><span>Read More</span></a></div>
<a href="/blog/2011/07/django-and-postgresql-improving-the-performance-with-no-effort-and-no-code/#comments" title="Comment on Django and PostgreSQL &ndash; improving the performance with no effort and no code."><span class="dsq-postid" data-dsqidentifier="100 http://www.askthepony.com/?p=100">22 Comments</span></a>
<div class="clear"></div>
</div>
<div class="post" id="post_id_76">
<h1><a href="/blog/2011/06/how-to-send-a-proper-unicode-encoded-email-using-python-2-7/">How to send a proper unicode encoded email using Python 2.7</a></h1>
<span class="meta">Posted by tkopczuk on June 28, 2011</span>
<div class="content">
<div class="blog_img"><a href="/blog/2011/06/how-to-send-a-proper-unicode-encoded-email-using-python-2-7/"><img width="584" height="150" src="/wp-content/themes/freshserve/scripts/timthumb.php?src=http://www.askthepony.com/wp-content/uploads/2011/06/23795taanm1yruc.jpg&amp;h=150&amp;w=584&amp;zc=1" /></a></div>
<p>While working on a Django Celery task to send thousands of emails in various languages I had a problem with sending accented letters. Web crossed the Unicode line a while ago &ndash; email has yet to follow.</p>
<p>My method works even with SendGrid.</p>
</div>
<div class="read_more"><a href="/blog/2011/06/how-to-send-a-proper-unicode-encoded-email-using-python-2-7/" class="button"><span>Read More</span></a></div>
<a href="/blog/2011/06/how-to-send-a-proper-unicode-encoded-email-using-python-2-7/#comments" title="Comment on How to send a proper unicode encoded email using Python 2.7"><span class="dsq-postid" data-dsqidentifier="76 http://www.askthepony.com/?p=76">10 Comments</span></a>
<div class="clear"></div>
</div>
<div class="navigation">
<div class="alignleft"></div>
<div class="alignright"></div>
</div>
</div>
<div class="page_sidebar_wrapper">
<div class="page_sidebar">
<div id="text-2" class="widget scg_widget SB1 widget_text">
<h3 class="widgettitle">About this blog</h3>
<div class="textwidget">
<p></p>
<p><b>Ask The Pony</b> is a weblog, where various members of our team share knowledge about <b>Django</b>.</p>
<p>Make <b><i>lightning fast</i></b> apps that scale.</p>
<p><br /><br /></p>
<p></p>
</div>
</div>
<div id="text-3" class="widget scg_widget SB1 widget_text">
<h3 class="widgettitle">Are you a designer?</h3>
<div class="textwidget">
<div style="font-family: Lucida Grande;">
<p style="text-align: center; font-size: 85%; line-height: 1.5;"><a style="text-decoration: none;" href="http://www.snaprulerapp.com/" rel="nofollow"><span style="display: block;" onclick="_gaq.push(['_trackEvent', 'snapruler', 'icon-or-title']);"><img width="128" height="128" src="/static/smallicon.png" /></span><span style="font-weight: bold; font-size: 123%; text-decoration: none;">SnapRuler</span><br />our delicious screen ruler for Mac</a></p>
<p style="float: left; font-size: 78px; height: 30px; margin-top: 27px; width: 44px;">&rdquo;</p>
<p style="text-align: justify; line-height: 1.5;"><span style="font-size: 80%;">If you&rsquo;re a full time designer or developer, get ready to have your mind blown.</span><br /><strong style="font-size: 80%; position: relative; top: 5px;">Harrison Weber, <a href="http://thenextweb.com/dd/2012/01/13/this-measuring-tool-makes-life-as-a-web-designer-way-easier/" rel="nofollow">The Next Web</a></strong></p>
<p style="text-align: center; margin-bottom: 0; margin-top: 5px;"></p>
</div>
</div>
</div>
<div id="recent-posts-3" class="widget scg_widget SB1 widget_recent_entries">
<h3 class="widgettitle">Recent Posts</h3>
<div>
<ul id="-5537533410875749581">
<li><a href="/">Home page</a></li>
</ul>
</div>
<ul>
<li><a href="/blog/2011/08/fabric-script-to-deploy-minified-combined-and-otherwise-optimized-media/" title="Fabric script to deploy minified, combined and otherwise optimized media.">Fabric script to deploy minified, combined and otherwise optimized media.</a></li>
<li><a href="/blog/2011/07/setup-a-complete-django-server-deploy-rollback-%e2%80%93-all-in-one-powerful-script/" title="Setup a complete Django server, deploy, rollback &ndash; all in one powerful script.">Setup a complete Django server, deploy, rollback &ndash; all in one powerful script.</a></li>
<li><a href="/blog/2011/07/getting-django-on-heroku-prancing-8-times-faster/" title="Getting Django on Heroku prancing 8 times faster.">Getting Django on Heroku prancing 8 times faster.</a></li>
<li><a href="/blog/2011/07/django-and-postgresql-improving-the-performance-with-no-effort-and-no-code/" title="Django and PostgreSQL &ndash; improving the performance with no effort and no code.">Django and PostgreSQL &ndash; improving the performance with no effort and no code.</a></li>
<li><a href="/blog/2011/06/how-to-send-a-proper-unicode-encoded-email-using-python-2-7/" title="How to send a proper unicode encoded email using Python 2.7">How to send a proper unicode encoded email using Python 2.7</a></li>
</ul>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="bottom"></div>
</div>
<div id="footer" class="page">
<p>Copyright &copy; 2011 Blade Polska</p>
<ul>
<li class="page_item page-item-2 current_page_item"><a href="/blog/" title="Weekly Django bits from the team" style="border-top-left-radius: 6px 6px; border-top-right-radius: 6px 6px; border-bottom-right-radius: 6px 6px; border-bottom-left-radius: 6px 6px;" onclick="_gaq.push(['_trackEvent', '/blog/', 'Blog menu link']);">Blog</a></li>
<li class="page_item page-item-19"><a href="/about/" title="About">About</a></li>
</ul>
<div class="clear"><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d9bab6b7adb8baad99bab8a9b0adb8b5b6b7bcb4b8aabab6adaaf7bab6b4">[email&#160;protected]</a></div>
</div>
<script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script><script type="text/javascript" src="/static/session.min.js"></script>
</body>
</html>