본문 바로가기

Python_WEB/Django

[Django]Signals

which helps allow decoupled applications get notified when actions occur elsewhere in the framework.
프레임워크의 다른 곳에서 작업이 발생할 때 분리된 응용 프로그램에 대해 통지할 수 있도록 지원

 

1> 모델의 save () 메소드가 호출되기 전이나 후에 전송

django.db.models.signals.pre_save

django.db.models.signals.post_save

 

https://docs.djangoproject.com/ko/3.0/ref/signals/#pre-save

 

Signals | Django 문서 | Django

The Django Software Foundation deeply values the diversity of our developers, users, and community. We are distraught by the suffering, oppression, and systemic racism the Black community faces every day. We can no longer remain silent. In silence, we are

docs.djangoproject.com

 

https://docs.djangoproject.com/ko/3.0/ref/signals/#post-save

 

Signals | Django 문서 | Django

The Django Software Foundation deeply values the diversity of our developers, users, and community. We are distraught by the suffering, oppression, and systemic racism the Black community faces every day. We can no longer remain silent. In silence, we are

docs.djangoproject.com

 

2> 모델의 delete () 메소드 또는 queryset의 delete () 메소드가 호출되기 전이나 후에 전송 

django.db.models.signals.pre_delete

django.db.models.signals.post_delete

 

https://docs.djangoproject.com/ko/3.0/ref/signals/#pre-delete

 

Signals | Django 문서 | Django

The Django Software Foundation deeply values the diversity of our developers, users, and community. We are distraught by the suffering, oppression, and systemic racism the Black community faces every day. We can no longer remain silent. In silence, we are

docs.djangoproject.com

 

https://docs.djangoproject.com/ko/3.0/ref/signals/#post-delete

 

Signals | Django 문서 | Django

The Django Software Foundation deeply values the diversity of our developers, users, and community. We are distraught by the suffering, oppression, and systemic racism the Black community faces every day. We can no longer remain silent. In silence, we are

docs.djangoproject.com

 

3> Django가 HTTP 요청을 시작하거나 마칠 때 보냄

django.db.models.signals.m2m_changed

 

https://docs.djangoproject.com/ko/3.0/ref/signals/#m2m-changed

 

Signals | Django 문서 | Django

The Django Software Foundation deeply values the diversity of our developers, users, and community. We are distraught by the suffering, oppression, and systemic racism the Black community faces every day. We can no longer remain silent. In silence, we are

docs.djangoproject.com