3 ms·
I'm not a fluent pythonist, but wouldn't you achieve the same result by renaming your "request" argument to "self" ? Before: > def flash_success(request, body,
by zimbatm 14y ago
I'm not a fluent pythonist, but wouldn't you achieve the same result by renaming your "request" argument to "self" ?
Before:
> def flash_success(request, body, title=''):
> request.session.flash({'body': body, 'title': title'})
After:
> def flash_success(self, body, title=''):
> self.session.flash({'body': body, 'title': title'})