'Get a csrf_token from the home page or read from the cookie jar
based on the last response'

def get_csrf_token(self, last=False):

    if (not last):
        self.get('/')
    csrf = [c for c in self.cookies.cookiejar if (c.name == 'csrftoken')]
    return (csrf[0].value if csrf else None)
