[Django]-How to write own methods in class based views and call the methods in urls

3👍

You need to call methods in get(), post() or whatever the HTTP request is. There isn’t a start HTTP request so Django won’t call that.

You can do the following in your view:

def get(self, request, *args, **kwargs):
    return self.start()

This return the result of self.start() whenever you visit your view with a HTTP GET request.

Leave a comment