~psycopg/psycopg/2.0.x

« back to all changes in this revision

Viewing changes to ZPsycopgDA/__init__.py

  • Committer: Federico Di Gregorio
  • Date: 2004-10-29 16:15:45 UTC
  • Revision ID: fog-a4e5ae2c65dfd04775bcecac32ed8e8dda664017
Undo of wrong commit of 1.1.x source code over 2.x.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
##############################################################################
2
 
3
 
# Zope Public License (ZPL) Version 1.0
4
 
# -------------------------------------
5
 
6
 
# Copyright (c) Digital Creations.  All rights reserved.
7
 
8
 
# This license has been certified as Open Source(tm).
9
 
10
 
# Redistribution and use in source and binary forms, with or without
11
 
# modification, are permitted provided that the following conditions are
12
 
# met:
13
 
14
 
# 1. Redistributions in source code must retain the above copyright
15
 
#    notice, this list of conditions, and the following disclaimer.
16
 
17
 
# 2. Redistributions in binary form must reproduce the above copyright
18
 
#    notice, this list of conditions, and the following disclaimer in
19
 
#    the documentation and/or other materials provided with the
20
 
#    distribution.
21
 
22
 
# 3. Digital Creations requests that attribution be given to Zope
23
 
#    in any manner possible. Zope includes a "Powered by Zope"
24
 
#    button that is installed by default. While it is not a license
25
 
#    violation to remove this button, it is requested that the
26
 
#    attribution remain. A significant investment has been put
27
 
#    into Zope, and this effort will continue if the Zope community
28
 
#    continues to grow. This is one way to assure that growth.
29
 
30
 
# 4. All advertising materials and documentation mentioning
31
 
#    features derived from or use of this software must display
32
 
#    the following acknowledgement:
33
 
34
 
#      "This product includes software developed by Digital Creations
35
 
#      for use in the Z Object Publishing Environment
36
 
#      (http://www.zope.org/)."
37
 
38
 
#    In the event that the product being advertised includes an
39
 
#    intact Zope distribution (with copyright and license included)
40
 
#    then this clause is waived.
41
 
42
 
# 5. Names associated with Zope or Digital Creations must not be used to
43
 
#    endorse or promote products derived from this software without
44
 
#    prior written permission from Digital Creations.
45
 
46
 
# 6. Modified redistributions of any form whatsoever must retain
47
 
#    the following acknowledgment:
48
 
49
 
#      "This product includes software developed by Digital Creations
50
 
#      for use in the Z Object Publishing Environment
51
 
#      (http://www.zope.org/)."
52
 
53
 
#    Intact (re-)distributions of any official Zope release do not
54
 
#    require an external acknowledgement.
55
 
56
 
# 7. Modifications are encouraged but must be packaged separately as
57
 
#    patches to official Zope releases.  Distributions that do not
58
 
#    clearly separate the patches from the original work must be clearly
59
 
#    labeled as unofficial distributions.  Modifications which do not
60
 
#    carry the name Zope may be packaged in any form, as long as they
61
 
#    conform to all of the clauses above.
62
 
63
 
64
 
# Disclaimer
65
 
66
 
#   THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND ANY
67
 
#   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
68
 
#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
69
 
#   PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL DIGITAL CREATIONS OR ITS
70
 
#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
71
 
#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
72
 
#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
73
 
#   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
74
 
#   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
75
 
#   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
76
 
#   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
77
 
#   SUCH DAMAGE.
78
 
79
 
80
 
# This software consists of contributions made by Digital Creations and
81
 
# many individuals on behalf of Digital Creations.  Specific
82
 
# attributions are listed in the accompanying credits file.
83
 
84
 
##############################################################################
85
 
# Modified by mcm@initd.net for the psycopg driver
86
 
__doc__='''Generic Database Adapter Package Registration
87
 
 
88
 
$Id: __init__.py 400 2003-01-20 14:39:34Z fog $'''
89
 
__version__='$Revision: 1.11 $'[11:-2]
90
 
 
91
 
import sys, string
 
1
# ZPsycopgDA/__init__.py - ZPsycopgDA Zope product
 
2
#
 
3
# Copyright (C) 2004 Federico Di Gregorio <fog@initd.org>
 
4
#
 
5
# This program is free software; you can redistribute it and/or modify
 
6
# it under the terms of the GNU General Public License as published by the
 
7
# Free Software Foundation; either version 2, or (at your option) any later
 
8
# version.
 
9
#
 
10
# Or, at your option this program (ZPsycopgDA) can be distributed under the
 
11
# Zope Public License (ZPL) Version 1.0, as published on the Zope web site,
 
12
# http://www.zope.org/Resources/ZPL.
 
13
#
 
14
# This program is distributed in the hope that it will be useful, but
 
15
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY
 
16
# or FITNESS FOR A PARTICULAR PURPOSE.
 
17
#
 
18
# See the LICENSE file for details.
 
19
 
 
20
__doc__ = "ZPsycopg Database Adalper Registration." 
 
21
__version__ = '2.0'
 
22
 
 
23
import sys
 
24
import string
92
25
import DA
93
26
 
94
 
methods=DA.folder_methods
95
 
misc_ = DA.misc_
 
27
methods    = DA.folder_methods
 
28
classes    = DA.classes
 
29
meta_types = DA.meta_types
 
30
misc_      = DA.misc_
96
31
 
97
 
def initialize(context):
98
 
    """Initialize the DBA product.
99
 
    """
100
 
    context.registerClass(
101
 
        DA.Connection,
102
 
        permission = 'Add Z Psycopg Database Connections',
103
 
        constructors = (DA.manage_addZPsycopgConnectionForm,
104
 
                        DA.manage_addZPsycopgConnection),
105
 
        icon = SOFTWARE_HOME + '/Shared/DC/ZRDB/www/DBAdapterFolder_icon.gif')
 
32
__ac_permissions__=DA.__ac_permissions__