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

@ -1,3 +1,22 @@
from django.contrib import admin
from django.utils.html import format_html
from django.core.urlresolvers import reverse
from .models import Donation
# Register your models here.
class DonationAdmin(admin.ModelAdmin):
list_display = ('id', 'donation', 'donator')
search_fields = ['id', 'donator__user__email']
def user(self, obj):
email = obj.customer.user.email
user_url = reverse("admin:membership_customuser_change", args=[obj.customer.user.id])
return format_html("<a href='{url}'>{email}</a>", url=user_url, email=email)
admin.site.register(Donation, DonationAdmin)