How in Django to call the get method of the parent class CreateView?

In the overridden method get you need to implement the access check and call the parent's get() if the test is successful. How to do it correctly?

class ItemCreateView(CreateView):
 model = Item
 fields = ['title', 'description', 'image', 'price']

 def get(self, request):
 if not request.user.is_staff:
 raise PermissionDenied
 super() #???????????
April 3rd 20 at 18:54
1 answer
April 3rd 20 at 18:56
Solution
def get(self, request, **kwargs):
 if not request.user.is_staff:
 raise PermissionDenied
 super().get(request, **kwargs)
Thank you. - Magdalen commented on April 3rd 20 at 18:59

Find more questions by tags Django