anonymous user in django app

2019-06-27 Thread Gaurav Sahu
Hy, I have a Django blog app. I want to add a feature in which a registered user can add a post anonymously. But I couldn't figure out how to do it. Anybody help me how can I implement this feature? It will be a great help. Thanks in advance. -- You received this message because you are

Getting posts of a category in blog application

2019-06-26 Thread Gaurav Sahu
I want to grab all the posts of a particular category. I am passing th url like this: {% url 'blog:post_list' %}?category={{ cat }}. But I am not able how to return the queryset for posts of the category cat passed in the url. my Post model: class Post(models.Model): title =

Re: Anyone is able to delete or update other's post through url

2019-06-24 Thread Gaurav Sahu
24, 2019 at 8:39:26 PM UTC+5:30, Aldian Fazrihady wrote: > > I would implement get_queryset method that filter blog post by > author=self.request.user > > Regards, > > Aldian Fazrihady > > On Sun, 23 Jun 2019, 20:55 Gaurav Sahu, > > wrote: > >> Hy,

Anyone is able to delete or update other's post through url

2019-06-23 Thread Gaurav Sahu
Hy, I am developing a Django Blog application. In this application, I have a PostEdit view to edit the post, Delete post view to delete the post. These operations can only be performed by the user who has created that post. I used Delete view as a functional view and edit view as CBV. Now

Anyone is able to delete or update other's post through url

2019-06-23 Thread Gaurav Sahu
ok -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to

Login page is still visible for already logged in user

2019-06-08 Thread Gaurav Sahu
Hy everyone, When a person is already logged in he/she can still be able to access login form in my login Django functionality by typing the login URL. I am using Django's default LoginView as my login view. This is the URL of my login page. re_path(r'login/$',

Django user profile shared among different apps

2019-06-05 Thread Gaurav Sahu
Hy Everyone, I have a Django website which has multiple apps one of the apps is accounts app. accounts app is responsible for user sign up and authentication. Now I want to create a user profile in my website and that user will be the same across all of my web apps. how can I implement this?