def get_sidebar_widget(kls, request): if not request.user.is_anonymous(): from views import sidebar_widget return sidebar_widget(request) return None