0

Django Queryset

Hello I'm new in Django and i try to use Class Based Views for my project, but i have problem in this. I wanna login a user into a page with its primary key but i dont know how to override queryset. here is my code, any help will preciate. in the views.py : class UserPage(LoginRequiredMixin, DetailView): template_name = 'user_page.html' model = User login_url = '/login/' def get_queryset(self): pass in the urls.py : path('user/<int:pk>/' , UserPage.as_view()),

24th Jan 2023, 6:00 PM
mehdi
0 Réponse