# Django signal on update via Django admin

**URL:** <https://forum.djangoproject.com/t/django-signal-on-update-via-django-admin/962>\
**Category:** Forms & APIs\
**Created:** [January 26, 2020, 8:56am UTC](https://forum.djangoproject.com/t/django-signal-on-update-via-django-admin/962 "2020-01-26T08:56:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohanjaswal2507](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/rohanjaswal2507/32/2236_2.png) [@rohanjaswal2507](https://forum.djangoproject.com/u/rohanjaswal2507)\
**Post date:** [January 26, 2020, 8:56am UTC](https://forum.djangoproject.com/t/django-signal-on-update-via-django-admin/962/1 "2020-01-26T08:56:36Z")

</div>

I have some content in my database which is managed using Django admin. Now, I want to send a signal whenever any data is updated using django admin for those particular models.

I can’t use post\_save signals because django admin does not call the save method of those models.

How can I do this? Please help!

---

<div class="post-metadata">

**Author:** ![mblayman](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/mblayman/32/101_2.png) [@mblayman](https://forum.djangoproject.com/u/mblayman)\
**Post date:** [January 26, 2020, 9:41pm UTC](https://forum.djangoproject.com/t/django-signal-on-update-via-django-admin/962/2 "2020-01-26T21:41:11Z")

</div>

Can you explain more? I ran a quick test on one of my projects. I added the following `post_save` handler.

```python
@receiver(post_save, sender=CourseTask)
def check_signal(sender, instance, created, **kwargs):
    print("Hello from signal handler")

```

Then I created a new `CourseTask` from my admin page. In my logs, I got:

```nohighlight
4:37:32 PM web.1 | Hello from signal handler

```

I think this makes it clear that `post_save` **does** run from the admin so I’m not clear how why your setup is not working. If you can provide more context, that might be helpful in figuring out your problem.

---

<div class="post-metadata">

**Author:** ![jeffctr](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/jeffctr/32/21767_2.png) [@jeffctr](https://forum.djangoproject.com/u/jeffctr)\
**Post date:** [June 7, 2024, 2:01am UTC](https://forum.djangoproject.com/t/django-signal-on-update-via-django-admin/962/3 "2024-06-07T02:01:58Z")

</div>

I am working with Django 4.1 and python 9.12. I created my model register it in the admin, create a folder signals, then a file where I registered my signal but when I update or create within django-admin I cannot see the signal be called. I tested `post_save, pre_save` but none of these options work.

```auto
@receiver(pre_save, sender=TestModel)
def check_signal(sender, instance, **kwargs):
    print("Testing signal call ....")

```

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [June 7, 2024, 2:20am UTC](https://forum.djangoproject.com/t/django-signal-on-update-via-django-admin/962/4 "2024-06-07T02:20:41Z")

</div>

Please post the contents of _every_ file that you edited to create and register your signal handler. There are lots of different ways to set these up, and the details can get “picky”.

---

<div class="post-metadata">

**Author:** ![jeffctr](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/jeffctr/32/21767_2.png) [@jeffctr](https://forum.djangoproject.com/u/jeffctr)\
**Post date:** [June 7, 2024, 3:20am UTC](https://forum.djangoproject.com/t/django-signal-on-update-via-django-admin/962/5 "2024-06-07T03:20:55Z")

</div>

UPDATE: I inported the signal in the `ready()` method of `AppConfig` now it is working

```auto
# main_app/apps.py
from django.apps import AppConfig

class MainAppConfig(AppConfig):
    name = 'main_app'

    def ready(self):
        from main_app.signals import *

```
