Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import my_app
def get_menu(context, request):
:type request: WSGIRequest
if not isinstance(request, WSGIRequest):
return None
# Try to get app list
template_response =
template_response_my_admin = my_app.admin.my_adminsite_instance.index(request)
app_list = template_response.context_data['app_list'] + template_response_my_admin.context_data['app_list']
except Exception:
return Menu(context, request, app_list).get_app_list()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment