class CommaSeparatedIntegerField(CharField):

    def formfield(self, **kwargs):
        defaults = {'form_class': forms.RegexField, 'regex': '^[\\d,]+$',
            'max_length': self.max_length, 'error_messages': {'invalid': _(
            'Enter only digits separated by commas.')}}
how do I use CommaSeparatedIntegerField in django?