File: global_symbols.py

package info (click to toggle)
zope-zattachmentattribute 2.21-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 324 kB
  • ctags: 238
  • sloc: sh: 1,365; python: 1,311; makefile: 89
file content (47 lines) | stat: -rw-r--r-- 1,327 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
##############################################################################
#
# Copyright (c) 2002 Ingeniweb SARL
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################

"""ZAttachmentAttribute product"""
import os


# Check if we have to be in debug mode
if os.path.isfile(os.path.abspath(os.path.dirname(__file__)) + '/debug.txt'):
    DEBUG_MODE = 1
else:
    DEBUG_MODE = 0


# Set log options correctly
import Log
if DEBUG_MODE:
    Log.LOG_LEVEL = Log.LOG_DEBUG
else:
    Log.LOG_LEVEL = Log.LOG_NOTICE

from Log import *
Log = Log
Log(LOG_NOTICE, "Starting %s at %d debug level" % (os.path.dirname(__file__), LOG_LEVEL, ))



MAX_PREVIEW_SIZE = 1024 * 5                 # If preview is larger than that, doesn't return it in the getSmallPreview() method



# AttachmentDemo permission
AttachmentDemo_addPermission = "Add AttachmentDemos"
AttachmentDemo_editPermission = "Edit AttachmentDemos"