Czytanie plików PNG a nie JPG w galerii.
[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 from api.handlers.text_handler import DocumentTextHandler
18
19 library_resource = Resource(dh.LibraryHandler, **authdata)
20 document_resource = Resource(dh.DocumentHandler, **authdata)
21 document_text_resource = Resource(DocumentTextHandler, **authdata)
22 document_html_resource = Resource(dh.DocumentHTMLHandler, **authdata)
23 # document_dc_resource = Resource(dh.DocumentDublinCoreHandler, **authdata)
24 document_gallery = Resource(dh.DocumentGalleryHandler, **authdata)
25 document_merge = Resource(dh.MergeHandler, **authdata)
26 diff_resource = Resource(dh.DiffHandler, **authdata)
27
28 import api.handlers.manage_handlers as mh
29
30 pullrequest_collection = Resource(mh.PullRequestListHandler, **authdata)
31 pullrequest_rsrc = Resource(mh.PullRequestHandler, **authdata)
32
33 #
34 # Toolbar resources
35 #
36 import api.handlers.toolbar_handlers as th
37 toolbar_buttons = Resource(th.ToolbarHandler, **authdata)
38 scriptlets = Resource(th.ScriptletsHandler, **authdata)
39
40
41
42 __all__ = [
43     'library_resource',
44     'document_resource',
45     'document_text_resource',
46     'document_html_resource',
47 #    'document_dc_resource',
48     'document_gallery',
49     'document_merge',
50     'toolbar_buttons',
51     'scriptlets',
52     'pullrequest_collection',
53     'pullrequest_rsrc',
54     'diff_resource',
55 ]