Beispiel #1
0
 def clean_cache(self, request):
     """
     Remove all MenuItems from Cache.
     """
     treenav.delete_cache()
     self.message_user(request, _('Cache menuitem cache cleaned successfully.'))
     info = self.model._meta.app_label, self.model._meta.module_name
     return redirect('admin:%s_%s_changelist' % info)
Beispiel #2
0
def treenav_clean_menu_cache(request):
    """
    Remove all MenuItems from Cache.
    """
    treenav.delete_cache()
    request.user.message_set.create(message='Cache menuitem cache cleaned '
                                    'successfully.')
    return HttpResponseRedirect(request.META.get('HTTP_REFERER', '/admin/'))
Beispiel #3
0
 def clean_cache(self, request):
     """
     Remove all MenuItems from Cache.
     """
     treenav.delete_cache()
     self.message_user(request,
                       _('Cache menuitem cache cleaned successfully.'))
     info = self.model._meta.app_label, self.model._meta.module_name
     return redirect('admin:%s_%s_changelist' % info)
Beispiel #4
0
 def clean_cache(self, request):
     """
     Remove all MenuItems from Cache.
     """
     treenav.delete_cache()
     self.message_user(request, _('Cache menuitem cache cleaned successfully.'))
     info = self.model._meta.app_label, self.model._meta.model_name
     changelist_url = reverse('admin:%s_%s_changelist' % info, current_app=self.admin_site.name)
     return redirect(changelist_url)
Beispiel #5
0
 def clean_cache(self, request):
     """
     Remove all MenuItems from Cache.
     """
     treenav.delete_cache()
     self.message_user(request,
                       _('Cache menuitem cache cleaned successfully.'))
     info = self.model._meta.app_label, self.model._meta.model_name
     changelist_url = reverse('admin:%s_%s_changelist' % info,
                              current_app=self.admin_site.name)
     return redirect(changelist_url)