Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
6820e9ce
Commit
6820e9ce
authored
Dec 08, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Z_REALM and Z_DEBUG_MODE.
parent
246451d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
lib/python/ZPublisher/Publish.py
lib/python/ZPublisher/Publish.py
+10
-4
No files found.
lib/python/ZPublisher/Publish.py
View file @
6820e9ce
...
...
@@ -84,8 +84,8 @@
##############################################################################
__doc__
=
"""Python Object Publisher -- Publish Python objects on web servers
$Id: Publish.py,v 1.11
1 1998/12/04 20:15:32
jim Exp $"""
__version__
=
'$Revision: 1.11
1
$'
[
11
:
-
2
]
$Id: Publish.py,v 1.11
2 1998/12/08 19:08:54
jim Exp $"""
__version__
=
'$Revision: 1.11
2
$'
[
11
:
-
2
]
import
sys
,
os
,
string
,
cgi
,
regex
from
string
import
lower
,
atoi
,
rfind
,
split
,
strip
,
join
,
upper
,
find
...
...
@@ -613,6 +613,8 @@ def get_module_info(module_name, modules={},
# Let the app specify a realm
if
hasattr
(
module
,
'__bobo_realm__'
):
realm
=
module
.
__bobo_realm__
elif
os
.
environ
.
has_key
(
'Z_REALM'
):
realm
=
os
.
environ
[
'Z_REALM'
]
elif
os
.
environ
.
has_key
(
'BOBO_REALM'
):
realm
=
os
.
environ
[
'BOBO_REALM'
]
else
:
realm
=
module_name
...
...
@@ -620,8 +622,12 @@ def get_module_info(module_name, modules={},
# Check for debug mode
if
hasattr
(
module
,
'__bobo_debug_mode__'
):
debug_mode
=
not
not
module
.
__bobo_debug_mode__
elif
os
.
environ
.
has_key
(
'BOBO_DEBUG_MODE'
):
debug_mode
=
lower
(
os
.
environ
[
'BOBO_DEBUG_MODE'
])
elif
(
os
.
environ
.
has_key
(
'Z_DEBUG_MODE'
)
or
os
.
environ
.
has_key
(
'BOBO_DEBUG_MODE'
)):
if
os
.
environ
.
has_key
(
'Z_DEBUG_MODE'
):
debug_mode
=
lower
(
os
.
environ
[
'Z_DEBUG_MODE'
])
else
:
debug_mode
=
lower
(
os
.
environ
[
'BOBO_DEBUG_MODE'
])
if
debug_mode
==
'y'
or
debug_mode
==
'yes'
:
debug_mode
=
1
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment