Controlling Django auth user access to specific object instances

前端 未结 3 1149
无人及你
无人及你 2021-01-22 16:34

In my Django project, I have various users created by Django\'s built-in authentication system. Each user can create their own instances of the App model. I would

3条回答
  •  醉话见心
    2021-01-22 17:10

    I would put the form submission in a different view and write a custom decorator, which you could also use for similar issues. I would also return a 404 instead of access denied. You might not want to show users that you are protecting something.

提交回复
热议问题