Articles tagged with Django

How to make a useful error page

Have you ever been on a website when something goes wrong? It’s not always clear what’s gone on, or what you can do to get back on track. What’s a 404 or a 500?! You might know this as a developer or web designer, but does the average Joe?

Error numbers are for developers

As the owner of a website you want to know what went wrong when or if it does and that’s why error numbers were created. But we build websites for users and not developers (except sites like this…), so the error numbers aren’t the key message that needs to be shown.

Guide a user via a good error pages

When a user visits a web page the most important thing is to give them the information that they need quickly and presented in a good way. The problem with a lot of error pages is that they treat users like robots and not as humans.

Disarm

Imagine you go into a hotel where you have a room ...

Read post... Posted in 'Web development'

Installing MySQL-Python on OS X with brew

OS X can be an absolute pain to get MySQL running so when you have finally resorted to using brew to install its, as I have on many occasion there is another pitfall you might face when you try to install other python packages that need to know the MySQL path.

The best and probably most common package that this happens to seems to be MySQL-Python so the following example will be what I use to demo the fix.

Assuming your virtualenv is up and running (or your installing straight on your machine) we need to do the following:

export PATH=$PATH:/usr/local/mysql/bin
pip install MySQL-Python

MySQL-Python (or your other MySQL needing package) should now install and you can get back to coding up some awesome websites.

Read post... Posted in 'Programming'

Installing specific versions with easy install

Recently I have been working on quite a few projects that require different versions of packages to run. Each setup has been running in a virtual environment (that is a post for another day) and setting them up with the required package rather than the latest that easy_install can find is really simple.

    easy_install "django == 1.3"

That will find and install Django version 1.3... simple as that!

Read post... Posted in 'Programming'