| Revision 5,
917 bytes
checked in by nigel.sim, 5 years ago
(diff) |
|
|
| Line | |
|---|
| 1 | # |
|---|
| 2 | # ShoeBox |
|---|
| 3 | # A start product for Plone - ShoeBox |
|---|
| 4 | # |
|---|
| 5 | # ShoeBoxTool.py |
|---|
| 6 | # Providing the ShoeBoxTool |
|---|
| 7 | # |
|---|
| 8 | # Author: Christian Koller <admin@iecw.net> |
|---|
| 9 | # |
|---|
| 10 | # Released under GNU GPL v2 or later |
|---|
| 11 | # |
|---|
| 12 | |
|---|
| 13 | from Products.CMFCore.utils import UniqueObject |
|---|
| 14 | from OFS.SimpleItem import SimpleItem |
|---|
| 15 | from Globals import InitializeClass |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | class ShoeBoxTool (UniqueObject, SimpleItem): |
|---|
| 19 | """ ShoeBoxTool .... """ |
|---|
| 20 | id = 'ShoeBoxTool' |
|---|
| 21 | meta_type= 'Shoe Box Tool' |
|---|
| 22 | plone_tool = 1 |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | ## |
|---|
| 26 | ## Return the link to the parent dir |
|---|
| 27 | ## |
|---|
| 28 | def getNavigationParent(self, path): |
|---|
| 29 | ret = path.split("/") |
|---|
| 30 | ret.pop() |
|---|
| 31 | return "/".join(ret) |
|---|
| 32 | |
|---|
| 33 | ## Initialize the ShoeBoxTool class |
|---|
| 34 | InitializeClass(ShoeBoxTool) |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | ## |
|---|
| 38 | ## A Simple ConnectError Error |
|---|
| 39 | ## |
|---|
| 40 | class ConnectError(Exception): |
|---|
| 41 | def __init__(self, value): |
|---|
| 42 | self.value = value |
|---|
| 43 | def __str__(self): |
|---|
| 44 | return repr(self.value) |
|---|
| 45 | |
|---|
| 46 | ## Initialize the ConnectError class |
|---|
| 47 | InitializeClass(ConnectError) |
|---|
| 48 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.