From 59a66107bb6467a6c5a005f728f9883c061cddae Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sun, 29 May 2016 19:33:26 +0200 Subject: [PATCH] rename CoinfyCallback model to CoinifyAPICallback --- shop/admin.py | 2 +- shop/models.py | 2 +- shop/views.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/shop/admin.py b/shop/admin.py index ce2c2a7a..4e4870f7 100644 --- a/shop/admin.py +++ b/shop/admin.py @@ -5,7 +5,7 @@ from . import models admin.site.register(models.EpayCallback) admin.site.register(models.EpayPayment) admin.site.register(models.CoinifyAPIInvoice) -admin.site.register(models.CoinifyCallback) +admin.site.register(models.CoinifyAPICallback) admin.site.register(models.Invoice) @admin.register(models.ProductCategory) diff --git a/shop/models.py b/shop/models.py index 761e7566..526af0dc 100644 --- a/shop/models.py +++ b/shop/models.py @@ -269,7 +269,7 @@ class CoinifyAPIInvoice(CreatedUpdatedModel): order = models.OneToOneField('shop.Order') -class CoinifyCallback(CreatedUpdatedModel): +class CoinifyAPICallback(CreatedUpdatedModel): headers = JSONField() payload = JSONField() order = models.ForeignKey('shop.Order') diff --git a/shop/views.py b/shop/views.py index 0b056c64..cfe78e1a 100644 --- a/shop/views.py +++ b/shop/views.py @@ -26,6 +26,7 @@ from shop.models import ( EpayCallback, EpayPayment, CoinifyAPIInvoice, + CoinifyAPICallback, ) from .forms import AddToOrderForm from .epay import calculate_epay_hash, validate_epay_callback @@ -397,7 +398,7 @@ class CoinifyCallbackView(SingleObjectMixin, View): headerdict[key[5:]] = value # save callback to db - callbackobject = CoinifyCallback.objects.create( + callbackobject = CoinifyAPICallback.objects.create( headers=json.dumps(headerdict), payload=request.body, order=self.get_object()