Django: How to "extend" Group creation using Signals?
I am not sure if I am asking the right question. But is it possible to add "behaviors" when creating a Group in Django? I want want to create directories/files after creating a Group in the admin panel.
The "additional" behaviors (creating the directory/file) can happen after the Group was successfully added in the database or after the POST was successf开发者_JAVA百科ul (?).
Thanks! Wenbert
Yes. Catch the post_save
signal for the Group
model, then do your processing in there.
精彩评论