Last change
on this file since 2654 was
2654,
checked in by liebster, 14 years ago
|
Created view using paster addcontent script
|
File size:
923 bytes
|
Line | |
---|
1 | from zope.interface import implements, Interface |
---|
2 | |
---|
3 | from Products.Five import BrowserView |
---|
4 | from Products.CMFCore.utils import getToolByName |
---|
5 | |
---|
6 | from quintagroup.gdocs.spreadsheet import spreadsheetMessageFactory as _ |
---|
7 | |
---|
8 | |
---|
9 | class IviewWorksheetView(Interface): |
---|
10 | """ |
---|
11 | viewWorksheet view interface |
---|
12 | """ |
---|
13 | |
---|
14 | def test(): |
---|
15 | """ test method""" |
---|
16 | |
---|
17 | |
---|
18 | class viewWorksheetView(BrowserView): |
---|
19 | """ |
---|
20 | viewWorksheet browser view |
---|
21 | """ |
---|
22 | implements(IviewWorksheetView) |
---|
23 | |
---|
24 | def __init__(self, context, request): |
---|
25 | self.context = context |
---|
26 | self.request = request |
---|
27 | |
---|
28 | @property |
---|
29 | def portal_catalog(self): |
---|
30 | return getToolByName(self.context, 'portal_catalog') |
---|
31 | |
---|
32 | @property |
---|
33 | def portal(self): |
---|
34 | return getToolByName(self.context, 'portal_url').getPortalObject() |
---|
35 | |
---|
36 | def test(self): |
---|
37 | """ |
---|
38 | test method |
---|
39 | """ |
---|
40 | dummy = _(u'a dummy string') |
---|
41 | |
---|
42 | return {'dummy': dummy} |
---|
Note: See
TracBrowser
for help on using the repository browser.