Category

Web
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
Flexbox vertical alignment differences
Thus far, I’m a huge fan of flexboxes. I ran into a bit of a block when I stuck three paragraphs with different font-sizes in the same row using a flexbox. Even after playing with the margin and padding and vertical-align (which, by the way, does nothing inside a flexbox) I couldn’t get the base...
Read More