X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/46fdcc29313a6c0dd897b8060335061f433897fd..22aac0da99594406b261f14c135812c855c196ef:/apps/api/handlers/toolbar_handlers.py diff --git a/apps/api/handlers/toolbar_handlers.py b/apps/api/handlers/toolbar_handlers.py deleted file mode 100644 index 5408db3b..00000000 --- a/apps/api/handlers/toolbar_handlers.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- encoding: utf-8 -*- - -__author__= "Łukasz Rekucki" -__date__ = "$2009-09-25 15:55:33$" -__doc__ = "Module documentation." - -from django.views.generic.simple import direct_to_template -from piston.handler import BaseHandler -from piston.utils import rc - -import settings - -import toolbar.models - -class ToolbarHandler(BaseHandler): - allowed_methods = ('GET',) - - def read(self, request): - groups = toolbar.models.ButtonGroup.objects.all() - return [g.to_dict(with_buttons=True) for g in groups] - -class ScriptletsHandler(BaseHandler): - allowed_methods = ('GET',) - - def read(self, request): - scriptlets = toolbar.models.Scriptlet.objects.all() - - return direct_to_template(request, 'toolbar_api/scriptlets.js', - extra_context = {'scriptlets': scriptlets }, - mimetype='text/javascript' ) \ No newline at end of file