Skip to content

Commit

Permalink
Cleaned up admin interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Sureiya committed Nov 14, 2013
1 parent dd30df1 commit 5fdc954
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion django_clickbank/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']


Expand All @@ -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)
Expand Down
8 changes: 6 additions & 2 deletions django_clickbank/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit 5fdc954

Please sign in to comment.