File diff 05bee8b3c3b9 → 31e51a774223
www/conservancy/apps/fundgoal/models.py
Show inline comments
 
from builtins import object
 
import random
 

	
 
from django.db import models
 

	
 
class FundraisingGoal(models.Model):
 
    """Conservancy fundraiser Goal"""
...
 
@@ -15,13 +16,13 @@ class FundraisingGoal(models.Model):
 
    def __unicode__(self):
 
        return self.fundraiser_code_name
 

	
 
    def percentage_there(self):
 
        return (self.fundraiser_so_far_amount / self.fundraiser_goal_amount ) * 100
 
    
 
    class Meta:
 
    class Meta(object):
 
        ordering = ('fundraiser_code_name',)
 

	
 
    def providers(self):
 
        return GoalProvider.objects.filter(fundraising_goal=self)
 

	
 
    def random_providers(self, k=None):