# Django admin tips and tricks - Part 2

If you want to read [Part 1](https://blog.devjunction.in/django-admin-tips-and-tricks-part-1) of this blog, [click](https://blog.devjunction.in/django-admin-tips-and-tricks-part-1) on this [link](https://blog.devjunction.in/django-admin-tips-and-tricks-part-1), for this whole series, [click](https://blog.devjunction.in/series/django-admin-tips-tricks) on this [link](https://blog.devjunction.in/series/django-admin-tips-tricks).

### How to disable `Add` button in the Django admin for certain Model admins?

Sometimes you do not want the admin to add new entries in a Model admin, here is how you disable the `Add` button, as given in the below image.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1670778191323/fkeeza5k4.png align="center")

```python
# app_name/admin.py

@admin.register(Book)
class BookAdmin(admin.ModelAdmin):
	...
	def has_add_permission(self, request, obj=None):
		return False
```

### How to disable edit/change functionality in the Django admin for certain Model?

Sometimes you do not want the admin to edit/change the entries in a Model Admin, here is how you disable the change/edit functionality.

```python
# app_name/admin.py

@admin.register(Book)
class BookAdmin(admin.ModelAdmin):
	...
	def has_change_permission(self, request, obj=None):
		return False
```

### How to disable `Delete` functionality in the Django admin for certain Model:

Sometimes you do not want the admin to edit/change the entries in a Model Admin, here is how you disable the `Delete` functionality.

```python
# app_name/admin.py

@admin.register(Book)
class BookAdmin(admin.ModelAdmin):
	...
	def has_delete_permission(self, request, obj=None):
		return False
```

This is it for this blog, let's meet in the next one.

***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)
