Added login.html, Added login view , Added login form,Created Donation Django Model
This commit is contained in:
parent
d7f7d498f5
commit
da9169c4ce
72 changed files with 30815 additions and 0 deletions
22
nosystemd/models.py
Normal file
22
nosystemd/models.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
from django.db import models
|
||||
from membership.models import CustomUser
|
||||
from utils.models import BillingAddress
|
||||
|
||||
|
||||
# Create your models here.
|
||||
|
||||
|
||||
class Donation(models.Model):
|
||||
|
||||
donation = models.FloatField()
|
||||
donator = models.ForeignKey(CustomUser)
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
billing_address = models.ForeignKey(BillingAddress)
|
||||
last4 = models.CharField(max_length=4)
|
||||
cc_brand = models.CharField(max_length=10)
|
||||
stripe_charge_id = models.CharField(max_length=100, null=True)
|
||||
|
||||
@classmethod
|
||||
def create(cls, data):
|
||||
obj = cls.objects.create(**data)
|
||||
return obj
|
||||
Loading…
Add table
Add a link
Reference in a new issue