def __call__(self, field_data, all_data):
        from math import log
        val = log(int(field_data)) / log(self.power_of)
        if val != int(val):
            raise ValidationError, gettext("This value must be a power of %s.") % self.power_of
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-0.96/django/core/validators.py/IsAPowerOf.__call__/original