Thursday, November 17, 2022

Re: public-permission profile in Django allauth

If I had to solve this problem I would first add an is_public BooleanField to my Tweet model.  Then, in my tweet view, I would check is_public and if it's not then check request.user.is_authenticated[1].

[1] https://docs.djangoproject.com/en/4.1/topics/auth/default/#authentication-in-web-requests

On November 15, 2022 9:23:00 PM CST, Jun Tanaka <tnajun@gmail.com> wrote:
Logged-in users  

2022年11月16日水曜日 9:56:23 UTC+9 Ryan Nowakowski:
Who should be able to view the non public tweets? Just the author?


On November 15, 2022 2:10:46 AM CST, Jun Tanaka <tna...@gmail.com> wrote:

Good day team,  

I'm making a Twitter-like application. I want to make it every user can choose his tweet public or not. I use Django allauth. Maybe, there is a configuration for this?

Also, be able to access the public-permission profile link without login

If anyone knows the simplest way to accomplish this please teach me. Any Code sample is very much appreciated.

Jun

No comments:

Post a Comment