diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7fa810a..a3ea27e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ # Change Log All notable changes to this project will be documented in this file. +## [0.8.3] +### Added +- filters to admin StripeCharge list + ## [0.8.2] ### Added - Signal "stripe_charge_refunded" on refund diff --git a/aa_stripe/__init__.py b/aa_stripe/__init__.py index 0f62407..28225ba 100644 --- a/aa_stripe/__init__.py +++ b/aa_stripe/__init__.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- __title__ = "Arabella Stripe" -__version__ = "0.8.2" +__version__ = "0.8.3" __author__ = "Jacek Ostanski" __license__ = "MIT" -__copyright__ = "Copyright 2017 Arabella" +__copyright__ = "Copyright 2019 Arabella" # Version synonym VERSION = __version__ diff --git a/aa_stripe/admin.py b/aa_stripe/admin.py index 8835045..2f2028a 100644 --- a/aa_stripe/admin.py +++ b/aa_stripe/admin.py @@ -44,9 +44,15 @@ class StripeCustomerAdmin(ReadOnly): class StripeChargeAdmin(ReadOnly): - list_display = ("id", "user", "customer", "created", "updated", "object_id", "is_charged", "amount") + search_fields = ("user__email", "customer__stripe_customer_id") + list_display = ("id", "user", "stripe_customer_id", "created", "updated", "object_id", "is_charged", "amount") + list_filter = ("created", "updated", "is_charged") ordering = ("-created",) + def stripe_customer_id(self, obj): + if obj.customer: + return obj.customer.stripe_customer_id + class StripeCouponAdmin(admin.ModelAdmin): form = StripeCouponForm