Tag

python
Screenshot of Python code distorted and warped
Tox provides great support for testing Python packages against multiple Python versions. But what if you have a carefully crafted Python environment already and you want to support additional Python versions without clobbering your setup? This guide explains how to cleanly install multiple Python versions side-by-side without overwriting your existing Python executable.
Read More
Canopy for Mac and an Oh My Zsh Terminal window
Enabling Canopy's Python in Oh My Zsh is not that much different than doing so in bash. You just have to edit your .zshrc file and prepend your PATH to look in Canopy's bin folder for packages before looking in your user's bin folder. Find out how.
Read More
Screenshot of Python code distorted and warped
Here is some code that can be used to download an image from a URL, verify that it is actually a non-corrupt image, save the image to Django’s media folder, and then associate that image to a model Class using Django’s ImageField.
Read More
Django's admin list display view
Verbose names in Django allow you to customize the headings in list_display, form fields, and even the name that appears in the admin for the model Class. Adding a verbose name to any model, property, or method will ensure that pretty names are used everywhere in the Django admin. In the example below, the model...
Read More
96% of people fail this test. How many squares are there?
I see and hear it almost every day: someone misinterprets data or makes a false assumption often using terrible data, spreads the stats, and suddenly the masses are shouting this incredibly new and insightful statistic. What a load of crap this usually is. In my mind I go through all the possible holes – did...
Read More