def progress_for(self, user):
        try:
            # Look for an existing progress record...
            p = Progress.objects.get(user=user, badge=self)
        except Progress.DoesNotExist:
            # If none found, create a new one but don't save it yet.
            p = Progress(user=user, badge=self)
        return p
Get or create (but not save) a progress record for a user
dataset/ETHPy150Open mozilla/django-badger/badger/models.py/Badge.progress_for