Internet Explorer — Fancybox Issues (1.3.x)

I was wondering what was causing my Fancybox to display incorrectly in IE, because i kinda assumed a release would be stable across modern browsers.

The problem is just that fancybox 1.3.x has been released w/o working for IE8.

Switch back to 1.2.6 and we’re good to go.

Django — ModelAdmin object has no attribute ‘__name__’

Got this delicious error today.

AttributeError: ‘ReturnAdmin’ object has no attribute ‘__name__’

Turns out that you can’t use the ForeignKey traversing syntax used everywhere in Django for ModelAdmin list_display

list_display = ('my_fk__blah',)

Will throw this mysterious error.

Django — How to filter models by a field on the model

I had read this functionality in the docs, but couldn’t find it with my googlefu.

Update: I couldn’t find my own post via my googlefu when I needed it again so I will insert some useful keywords here: Django Self Reference Field

For future reference, it’s the F object from django.db.models

Syntax:

Model.objects.filter(some_field=F('other_field'))

This would filter for models where some_field is equal to other_field in the same instance.

British told how to treat visitors for London 2012 Olympics

Hilarious article on how the british are being told to handle visitors of various foreign cultures.


Daniel gets quoted on some Argentine specific gotchas nobody was aware of.

“Don’t pour wine (for an Argentinean). The whole process has a number of social taboos and unless you understand them you could insult someone. For example, pouring wine backwards into a glass indicates hostility.”

More fun stuff…

He may be smiling. Don’t be fooled. If he’s Japanese that doesn’t mean he’s happy.

Stop snapping your fingers (Belgians).

Don’t wink (Hong Kong again).

Don’t say thank you (Chinese).

Quite a funny read..

http://www.thestar.com/news/world/article/846560–british-told-how-to-treat-visitors-including-canadians-to-the-2012-olympics

Mac — Adding Hex Color Picker to Color Picker

I’ve actually been launching Photoshop here and there to get my color picker (ridiculous, I know), or if I manage to remember, preview + color picker.

It’s time to set up a real hex color picker.

First, let’s make the color picker an executable app.

Push CMD + Space, and run AppleScript Editor

In the window that appears, type in “choose color”.

Save it as an app in the “file format” field, and name it what you’d like.

Now I’d go ahead and give it the icon of the Digital Color Meter and throw it on the dock:


Install HexColorPicker

Download file at http://wafflesoftware.net/hexpicker/

and move the HexColorPicker.colorPicker to your ~/Library/ColorPickers

You’re done — start the app and look at your shiny new tab on the right.