-
Recent Posts
Recent Comments
- tb on Pre-compiled binaries for PyCrypto 2.6.1 (py27) on Win7
- Dominik on Pre-compiled binaries for PyCrypto 2.6.1 (py27) on Win7
- admin on Package dk
- admin on django :: list_display can’t sort on attribute of foreign key field…
- Anika Dejong Butler on django :: list_display can’t sort on attribute of foreign key field…
Archives
Categories
Meta
Category Archives: django
django :: list_display can’t sort on attribute of foreign key field…
I’m not the only one surprised by the fact that you can’t use the double-underscore-foreignkey-attribute-accessor syntax in list_display: [python] class MyModelOptions(admin.ModelAdmin): list_display = [‘fk_field__fk_attribute’] # ILLEGAL [/python] There has been extensive discussions on the tracker (https://code.djangoproject.com/ticket/5863) and on the mailing … Continue reading
django :: implementing reCAPTCHA in 5 easy steps
It turns out reCAPTCHA is very easy to implement 🙂 Step #1: install the Python client: [sourcecode language=”ps”] easy_install recaptcha-client [/sourcecode] Step #2: obtain public and private keys here: http://recaptcha.net/whyrecaptcha.html. Step #3: Then create a small helper module, mycaptcha.py, for … Continue reading
Posted in django
Leave a comment
django :: date filter cheat sheet
I don’t seem able to memorize the list of format characters for the date filter, maybe because the documentation lists them in alphabetical order. I’ve created the cheat sheet below with an attempt at semantic grouping… Time seconds s Seconds, … Continue reading
Posted in django
Leave a comment
django :: media, admin and otherwise
Django’s handling of media files such as images, css, etc. has confused me from the very beginning. I’m not going to claim that I fully understand the full ramifications yet, but at least I got something working… hopefully it’ll be … Continue reading
Posted in django
Leave a comment