Advertisement
horozov86

Details and Delete Profile

Feb 23rd, 2024
1,114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. class DetailProfileView(views.DetailView):
  2.     queryset = Profile.objects.all()
  3.     template_name = 'profiles/profile-details.html'
  4.  
  5.     def get_object(self, queryset=None):
  6.         return get_profile()
  7.  
  8.  
  9. class DeleteProfileView(views.DeleteView):
  10.     queryset = Profile.objects.all()
  11.     template_name = 'profiles/profile-delete.html'
  12.  
  13.     def get_object(self, queryset=None):
  14.         return get_profile()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement