Source

pixels_for_food / pixels / models.py

from django.db import models

# Create your models here.

class Donation (models.Model):
    """ Donation record """
    name = models.CharField(max_length=100, null=True)
    email = models.EmailField(max_length=50, null=True)
    Ann
    donation_date = models.DateTimeField(auto_now_add = True)    
    amount = models.DecimalField(max_digits=5, decimal_places=2)
    cause = models.ForeginKey("Casue", related_name="donations")
    
class Cause(models.Model):
    """ Charity that recives the donation    """
    name = models.CharField(max_length=100)
    picture = CharField(max_length=100)
    donation_url = models.URLField()
    link_url = models.URLField()
    active_donation_target = models.BooleanField()