Dołączenie skryptu /api/toolbar/scriptlets do editor.html.
[redakcja.git] / apps / api / resources.py
1 # -*- encoding: utf-8 -*-
2
3 __author__= "Łukasz Rekucki"
4 __date__ = "$2009-09-25 15:53:00$"
5 __doc__ = "Module documentation."
6
7 from piston.resource import Resource
8 from api.utils import DjangoAuth
9
10 authdata = {'authentication': DjangoAuth()}
11
12 #
13 # Library resources
14 #
15
16 import api.handlers.library_handlers as dh
17 library_resource = Resource(dh.LibraryHandler, **authdata)
18 document_resource = Resource(dh.DocumentHandler, **authdata)
19 document_text_resource = Resource(dh.DocumentTextHandler, **authdata)
20 document_html_resource = Resource(dh.DocumentHTMLHandler, **authdata)
21 document_dc_resource = Resource(dh.DocumentDublinCoreHandler, **authdata)
22 document_merge = Resource(dh.MergeHandler, **authdata)
23
24 import api.handlers.manage_handlers as mh
25
26 pullrequest_collection = Resource(mh.PullRequestListHandler, **authdata)
27 pullrequest_rsrc = Resource(mh.PullRequestHandler, **authdata)
28
29 #
30 # Toolbar resources
31 #
32 import api.handlers.toolbar_handlers as th
33 toolbar_buttons = Resource(th.ToolbarHandler, **authdata)
34 scriptlets = Resource(th.ScriptletsHandler, **authdata)
35
36
37
38 __all__ = [
39     'library_resource',
40     'document_resource',
41     'document_text_resource',
42     'document_html_resource',
43     'document_dc_resource',
44     'document_merge',
45     'toolbar_buttons',
46     'scriptlets',
47     'pullrequest_collection',
48     'pullrequest_rsrc',
49 ]