wenbert
wenbert

Reputation: 5303

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 successful (?).

Thanks! Wenbert

Upvotes: 0

Views: 339

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799110

Yes. Catch the post_save signal for the Group model, then do your processing in there.

Upvotes: 1

Related Questions