From 5fdc95424abda370aed4312b29e6ee13036b8186 Mon Sep 17 00:00:00 2001 From: Chris Modjeska Date: Thu, 14 Nov 2013 13:18:44 -0500 Subject: [PATCH] Cleaned up admin interface --- django_clickbank/admin.py | 3 ++- django_clickbank/models.py | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/django_clickbank/admin.py b/django_clickbank/admin.py index fde6a96..9ac8740 100644 --- a/django_clickbank/admin.py +++ b/django_clickbank/admin.py @@ -9,7 +9,7 @@ class NotificationAdmin(admin.ModelAdmin): list_display = ['receipt', 'parent_receipt', 'transaction_type', 'email', 'product_title', 'product_type', 'order_amount', 'recieved_amount', 'transaction_affiliate', 'transaction_date'] - + list_filter = ['transaction_type', 'transaction_date', 'verification_passed'] readonly_fields = ['post_data'] @@ -19,6 +19,7 @@ class PostAdmin(admin.ModelAdmin): form = PostAdminForm list_display = ['id', 'time', ] list_display_links = list_display + list_filter = ['failed'] admin.site.register(Notification, NotificationAdmin) diff --git a/django_clickbank/models.py b/django_clickbank/models.py index 4433207..1393427 100644 --- a/django_clickbank/models.py +++ b/django_clickbank/models.py @@ -2,8 +2,12 @@ from django.conf import settings from django_clickbank.signals import * +class ClickBankModel(models.model): + class Meta: + app_label = 'Clickbank Notifications' + abstract = True -class Post(models.Model): +class Post(ClickBankModel): """ Debug model used to log raw POST dictionaries of clickbank data in order to create test posts @@ -21,7 +25,7 @@ def __unicode__(self): return u'{0}'.format(self.id) -class Notification(models.Model): +class Notification(ClickBankModel): """ Model to hold all of the information recieved in a ClickBank Notification """ # List of fields that need to be converted from unix epoch time to python DateTime instance.