开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜