django ModelChoiceField value not id

articles = ModelChoiceField(queryset=Articles.objects.all(),
        to_field_name='slug')

Here is what the above code is Doing:
1. We’re creating a custom form field, which we’re calling `ArticlesField`.
2. We’re setting the `queryset` attribute to the `Articles` model.
3. We’re setting the `to_field_name` attribute to the `slug` field.

Now, we can use this custom form field in our `CommentForm`: