Added DonatorStatus model in order to know if an donator has canceled or not his monthly donation, Now we create a DonatorStatus for the user after receiving his first donation. Added DonatorStatus view. Added donator_status.html in order to allow an user view his donation status , Added action to allow user to cancel his monthly donations. Now the user can logout using navbar. added Donation model to admin.Added command make_donations_charges in order to create stripe current monthly donations from all donators

This commit is contained in:
Levi 2016-07-27 00:08:45 -05:00
commit 4580a75f89
22 changed files with 611 additions and 232 deletions

View file

@ -11,6 +11,9 @@ class BillingAddress(models.Model):
postal_code = models.CharField(max_length=50)
country = CountryField()
def __str__(self):
return self.street_address
class ContactMessage(models.Model):
name = models.CharField(max_length=200)

View file

@ -11,7 +11,6 @@ def handleStripeError(f):
'error': None
}
common_message = "Currently its not possible to make payments."
try:
response_object = f(*args, **kwargs)
response = {
@ -85,7 +84,6 @@ class StripeUtils(object):
@handleStripeError
def make_charge(self, amount=None, customer=None):
amount = int(amount * 100) # stripe amount unit, in cents
charge = self.stripe.Charge.create(
amount=amount, # in cents
currency=self.CURRENCY,
@ -93,7 +91,6 @@ class StripeUtils(object):
)
return charge
@handleStripeError
def create_plan(self, amount, name, id):
self.stripe.Plan.create(