How can I override id field in django?

How can I override id AutoField user field in Django
I need to add attribute class id like this :

id = models.AutoField(widget=forms.TextInput(attrs={‘class’: ‘id_coststabel’}))

Why are you trying to mix up models and forms.?
you can achieve this by creating a model-form in which you can add Meta like this,

class Meta:
    model = User
    fields = ('id', 'email', 'password')
    widgets = {
         'id': TextInput(attrs={'class': 'id_coststabel'}),