'Logs out the user for the given HttpRequest.
This should *not* assume the user is already logged in.'

@never_cache
def logout(self, request, extra_context=None):

    from django.contrib.auth.views import logout
    defaults = {'current_app': self.name, 'extra_context': (extra_context or {})}
    if (self.logout_template is not None):
        defaults['template_name'] = self.logout_template
    return logout(request, **defaults)
