Mercurial > public > sg101
annotate donations/admin.py @ 953:8647a669edb4
Fix excessive cache usage for forum date/times.
Issue #84. Hitting the cache 30+ times while browsing the forums
to adjust all the dates/times into the user's time zone. Just
hit the user's profile and be done with it. It should be loaded.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 19 May 2015 21:08:45 -0500 |
parents | 18e42866b34d |
children |
rev | line source |
---|---|
bgneal@33 | 1 """ |
bgneal@33 | 2 This file contains the admin definitions for the donations application. |
bgneal@733 | 3 |
bgneal@33 | 4 """ |
bgneal@33 | 5 from django.contrib import admin |
bgneal@33 | 6 from donations.models import Donation |
bgneal@33 | 7 |
bgneal@33 | 8 class DonationAdmin(admin.ModelAdmin): |
bgneal@733 | 9 raw_id_fields = ['user'] |
bgneal@733 | 10 date_hierarchy = 'payment_date' |
bgneal@733 | 11 list_display = ['__unicode__', 'payer_email', 'payment_date', 'memo'] |
bgneal@33 | 12 |
bgneal@33 | 13 admin.site.register(Donation, DonationAdmin) |