def post(self, request):
        """ HTML post for status page
        If menu-rebuild has been posted, rebuild menu and redirect
        If clear-cache has been posted, clear cache and redirect
        :param request: the request object
        :return: response object (redirect to get)
        """
        if 'menu-rebuild' in request.POST:
            # noinspection PyUnresolvedReferences
            MenuItem.objects.rebuild()
            messages.success(request, _("Menu has been rebuilt."))
        if 'clear-cache' in request.POST:
            status.cache_clear()
            messages.success(request, _("Cache has been cleared."))
        return redirect('admin:index')
dataset/ETHPy150Open Wtower/django-ninecms/ninecms/views.py/StatusView.post/original