# How to change the input widget into a textfield in Django Model Admin form?

> Note: If you want to read the blog [series](https://blog.devjunction.in/series/django-admin-tips-tricks) on Django Admin customization, then [click here](https://blog.devjunction.in/series/django-admin-tips-tricks).

Suppose you have a `Book` model which has a `description` field as given below.

```python
# app_name/models.py

class Book(models.Model):
	...
	description = models.CharField(max_length=150)
```

As you can see above, you have a `models.CharField` in a model, and you want to show it as a `TextField` or you want to add a custom widget such as Rich Text Widget in the admin, here is how you can change the widget type with the help of `formfield_overrides`.

```python
# app_name/admin.py

from django.contrib import admin
from django.db import models
from app_name.models import Book

@admin.register(Book)
class BookAdmin(admin.ModelAdmin):
	...
	formfield_overrides = {
		models.CharField: {
			"widget": models.TextField
		}
	}
```

***Any thoughts? Write it down in the comments.***

> For more such crispy blogs daily, follow Dev.Junction, subscribe to our newsletter and get notified.

## **Social Links**

*   [**LinkedIn**](https://www.linkedin.com/in/mnamegaurav/)**:** [**https://www.linkedin.com/in/mnamegaurav/**](https://www.linkedin.com/in/mnamegaurav/)
    
*   [**YouTube**](https://www.youtube.com/devjunction)**:** [**https://www.youtube.com/devjunction**](https://www.youtube.com/devjunction)
    
*   [**Website**](https://gaurav.devjunction.in/)**:** [**https://gaurav.devjunction.in/**](https://gaurav.devjunction.in/)
    
*   [**GitHub**](https://github.com/mnamegaurav)**:** [**https://github.com/mnamegaurav**](https://github.com/mnamegaurav)
    
*   [**Instagram**](https://www.instagram.com/mnamegaurav/)**:** [**https://www.instagram.com/mnamegaurav/**](https://www.instagram.com/mnamegaurav/)
    
*   [**Twitter**](https://twitter.com/mnamegaurav)**:** [**https://twitter.com/mnamegaurav**](https://twitter.com/mnamegaurav)
