def change_view(self, request, object_id, extra_context={}):
        result = super(EnhancedModelAdmin, self).change_view(request, object_id, extra_context=extra_context)
        #raise Exception(result)
        
        # Look at the referer for a query string '^.*\?.*$'
        ref = request.META.get('HTTP_REFERER', '')
        if ref.find('?') != -1:
            # We've got a query string, set the session value
            request.session['filtered'] =  ref
        
        if request.POST.has_key('_save'):
            try:
                if request.session['filtered'] is not None:
                    result['Location'] = request.session['filtered']
                    request.session['filtered'] = None
            except Exception:
                pass
                
        return result
Get memcached status
dataset/ETHPy150Open baskoopmans/djcommon/djcommon/admin.py/EnhancedModelAdmin.change_view--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/memcached.py/status