Mercurial > p > roundup > code
comparison frontends/ZRoundup/__init__.py @ 446:ea9a4ca3fb84
Added a Zope frontend for roundup.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 12 Dec 2001 23:27:14 +0000 |
| parents | |
| children | e5826025eeb7 |
comparison
equal
deleted
inserted
replaced
| 445:208697858c8b | 446:ea9a4ca3fb84 |
|---|---|
| 1 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) | |
| 2 # This module is free software, and you may redistribute it and/or modify | |
| 3 # under the same terms as Python, so long as this copyright message and | |
| 4 # disclaimer are retained in their original form. | |
| 5 # | |
| 6 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR | |
| 7 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING | |
| 8 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE | |
| 9 # POSSIBILITY OF SUCH DAMAGE. | |
| 10 # | |
| 11 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, | |
| 12 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | |
| 13 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | |
| 14 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | |
| 15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | |
| 16 # | |
| 17 # $Id: __init__.py,v 1.1 2001-12-12 23:27:14 richard Exp $ | |
| 18 # | |
| 19 __version__='1.0' | |
| 20 | |
| 21 import os | |
| 22 # figure where ZRoundup is installed | |
| 23 here = None | |
| 24 if os.environ.has_key('INSTANCE_HOME'): | |
| 25 here = os.environ['INSTANCE_HOME'] | |
| 26 path = os.path.join(here, 'Products', 'ZRoundup') | |
| 27 if not os.path.exists(path): | |
| 28 path = os.path.join(here, 'lib', 'python', 'Products', 'ZRoundup') | |
| 29 if not os.path.exists(path): | |
| 30 here = None | |
| 31 if here is None: | |
| 32 from __main__ import here | |
| 33 path = os.path.join(here, 'Products', 'ZRoundup') | |
| 34 if not os.path.exists(path): | |
| 35 path = os.path.join(here, 'lib', 'python', 'Products', 'ZRoundup') | |
| 36 if not os.path.exists(path): | |
| 37 raise ValueError, "Can't determine where ZRoundup is installed" | |
| 38 | |
| 39 # product initialisation | |
| 40 import ZRoundup | |
| 41 def initialize(context): | |
| 42 context.registerClass( | |
| 43 ZRoundup, meta_type = 'Z Roundup', | |
| 44 constructors = ( | |
| 45 ZRoundup.manage_addZRoundupForm, ZRoundup.manage_addZRoundup | |
| 46 ) | |
| 47 ) | |
| 48 | |
| 49 # set up the icon | |
| 50 from ImageFile import ImageFile | |
| 51 misc_ = { | |
| 52 'icon': ImageFile('icons/tick_symbol.gif', path), | |
| 53 } | |
| 54 | |
| 55 | |
| 56 # | |
| 57 # $Log: not supported by cvs2svn $ | |
| 58 # | |
| 59 # | |
| 60 # vim: set filetype=python ts=4 sw=4 et si |
