def clean_slug(self):
        # Ensure slug is not an integer value for Event.get_by_ident
        data = self.cleaned_data['slug']

        try:
            int(data)
        except __HOLE__:
            pass
        else:
            raise forms.ValidationError("Slug must not be an integer-value.")

        return data
dataset/ETHPy150Open swcarpentry/amy/workshops/forms.py/EventForm.clean_slug