Posts Filed in "How-To's"

29

Mar

Filed in Code, Django, How-To's, Python with 10 comments |

Every time I meet someone new who asks me about Django, I tell them exactly what I think. It’s a great product. It does exactly what it’s designed to do. Allows you to build decently structured applications rapidly, without much overhead in doing so. One of the other things I tell them, is that the […]

28

Mar

Filed in Code, How-To's, Python with 3 comments |

Today I went head and finalized our build bot some of our public scripts. These scripts are mostly JavaScript based. I already had the build script zipping the file for tags and trunks of projects within the repository (we store all projects in one repository, instead of one repo per project). There were still a […]

22

Mar

Filed in Django, How-To's with 5 comments |

Recently I took the opportunity to configure my server for per-user hosting (to offer some free hosting to people who needed it). Doing this I had to configure mod_wsgi per-user as well. First, let me say that the documentation is excellent, but real world examples are always very helpful. Below is the output of a […]

22

Mar

Filed in Django, How-To's with no comments |

Today a question was raised on how to deploy Django on your server. I figured it’d be useful to put together a quick how-to for deploying Django on your standard LAMP infrastructure. I’m not going to say the way we’ve done things is the best, or if it’s even common, but it’s the way we’ve […]

24

Feb

Filed in Code, Django, How-To's, Python with 14 comments |

Again, I still suck at documentation, and my “tutorials” aren’t in-depth enough. So hopefully this covers all of the questions regarding using the django-sphinx module.

17

Jan

Filed in Code, Curse, How-To's, MySQL with no comments |

We ran across a fun gotcha today while performance testing some code. The issue was originally discovered when we noticed a 300ms query taking 20 seconds. After about an hour of debugging we found the issue to be with aliases in table locks.
Here’s what our original SQL looked like:

LOCK TABLES files_versiondownloadcount WRITE;
 
UPDATE files_version AS version, […]

3

Jan

Filed in Code, Django, How-To's with 3 comments |

It seems I suck at documentation (yes, It’s very true), so here’s a quick How-to on using the Sphinx ORM for Django we created:

20

Dec

Filed in Code, Curse, Django, How-To's with no comments |

One issue I’ve personally had to overcome with Django, and languages which aren’t specifically designed for the web, is that you don’t have access to the environment everywhere. The environment I’m referring to, is the current request, and response objects.
In PHP there is no response object, at least not one as you would see in […]

5

Nov

Filed in Code, How-To's, Mac, MySQL with 6 comments |

As many people probably have, I ran across the problem of installing MySQLdb (Python) on Leopard today.
The error:
In file included from /usr/local/mysql/include/mysql.h:43,
from _mysql.c:40:
/usr/include/sys/types.h:92: error: duplicate ‘unsigned’
/usr/include/sys/types.h:92: error: two or more data types
in declaration specifiers
error: Setup script exited with error: command ‘gcc’ failed
with exit status 1
Luckily, there are people out there who know a lot more […]

5

Nov

Filed in How-To's, Mac, PHP with no comments |

Apple made it easy this time around. Leopard defaults with Apache2 and PHP5, and enabling it is as simple as uncommenting a line. Check out this guide for a full tour of using Apache2 with PHP5 and MySQL on the latest release from Apple.