开发者

Adding custom permissions to imported models

In my Django project, I would like to add a custom permission to the User model imported from django.contrib.auth.

(Specifically, a permission to al开发者_JAVA技巧low/deny the user to change their password).

I do understand how to add permissions to my own model, however, I would like the ability to extend an existing model.

Is this possible?


These instructions are a bit outdated, but should give you an idea on how to extend the User model via inheritance, so that you could add any new functionality to the subclass.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜