def widget_toggle(request):
 collapsed = request.GET.get(u'collapse', None)
 widget = request.GET.get(u'widget', None)
 if (widget and collapsed):
  siteconfig = SiteConfiguration.objects.get_current()
  widget_settings = siteconfig.get(u'widget_settings', {})
  widget_settings[widget] = collapsed
  siteconfig.set(u'widget_settings', widget_settings)
  siteconfig.save()
 return HttpResponse(u'')

def widget_toggle ( request ) : collapsed = request . GET . get ( u'collapse' , None ) widget = request . GET . get ( u'widget' , None ) if ( widget and collapsed ) : siteconfig = SiteConfiguration . objects . get_current ( ) widget_settings = siteconfig . get ( u'widget_settings' , { } ) widget_settings [ widget ] = collapsed siteconfig . set ( u'widget_settings' , widget_settings ) siteconfig . save ( ) return HttpResponse ( u'' )
toggle a widgets collapsed state .