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
875c81dc
Commit
875c81dc
authored
Aug 28, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Jim told Paul to do it
parent
ff382ebc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
14 deletions
+53
-14
lib/python/Globals.py
lib/python/Globals.py
+25
-14
lib/python/Main.py
lib/python/Main.py
+28
-0
No files found.
lib/python/Globals.py
View file @
875c81dc
"""Global definitions"""
__version__
=
'$Revision: 1.4 $'
[
11
:
-
2
]
__version__
=
'$Revision: 1.5 $'
[
11
:
-
2
]
try
:
home
=
CUSTOMER_HOME
,
SOFTWARE_HOME
,
SOFTWARE_URL
CUSTOMER_HOME
,
SOFTWARE_HOME
,
SOFTWARE_URL
=
home
except
:
CUSTOMER_HOME
=
'../../customer/private'
SOFTWARE_HOME
=
'../..'
SOFTWARE_URL
=
''
__builtins__
[
'CUSTOMER_HOME'
]
=
'../../customer/private'
__builtins__
[
'SOFTWARE_HOME'
]
=
'../..'
__builtins__
[
'SOFTWARE_URL'
]
=
'../..'
from
SingleThreadedTransaction
import
PickleDictionary
,
Persistent
from
SingleThreadedTransaction
import
PersistentMapping
import
STPDocumentTemplate
from
App.Dialogs
import
MessageDialog
HTML
=
STPDocumentTemplate
.
HTML
import
DocumentTemplate
class
HTML
(
DocumentTemplate
.
HTML
,
Persistent
,):
"Persistent HTML Document Templates"
class
HTMLDefault
(
DocumentTemplate
.
HTMLDefault
,
Persistent
,):
"Persistent Default HTML Document Templates"
class
HTMLFile
(
STPDocumentTemplate
.
HTMLFile
):
"
"" ""
"
class
HTMLFile
(
DocumentTemplate
.
HTMLFile
,
Persistent
,
):
"
Persistent HTML Document Templates read from files
"
def
__init__
(
self
,
name
=
''
,
*
args
,
**
kw
):
args
=
(
self
,
'%s/lib/python/%s.dtml'
%
(
SOFTWARE_HOME
,
name
),)
+
args
apply
(
STPDocumentTemplate
.
HTMLFile
.
__init__
,
args
,
kw
)
try
:
home
=
CUSTOMER_HOME
,
SOFTWARE_HOME
,
SOFTWARE_URL
CUSTOMER_HOME
,
SOFTWARE_HOME
,
SOFTWARE_URL
=
home
except
:
CUSTOMER_HOME
=
'../../customer/private'
SOFTWARE_HOME
=
'../..'
SOFTWARE_URL
=
''
apply
(
HTMLFile
.
inheritedAttribute
(
'__init__'
),
args
,
kw
)
data_dir
=
CUSTOMER_HOME
+
'/var'
BobobaseName
=
'%s/Data.bbb'
%
data_dir
...
...
@@ -35,6 +43,9 @@ HTML.shared_globals['SOFTWARE_URL']=SOFTWARE_URL
# Log
#
# $Log: Globals.py,v $
# Revision 1.5 1997/08/28 19:32:36 jim
# Jim told Paul to do it
#
# Revision 1.4 1997/08/13 22:14:04 jim
# *** empty log message ***
#
...
...
lib/python/Main.py
View file @
875c81dc
...
...
@@ -9,7 +9,15 @@
##############################################################################
import
ni
,
sys
import
SimpleDB
,
Sync
class
SyncDB
(
SimpleDB
.
Default
,
Sync
.
Synchronized
):
pass
SimpleDB
.
Default
=
SyncDB
import
Globals
,
OFS
.
Folder
,
OFS
.
Application
,
App
.
ApplicationManager
import
OFS.Document
# Open the application database
Bobobase
=
OFS
.
Application
.
open_bobobase
()
...
...
@@ -24,11 +32,31 @@ except KeyError:
bobo_application
=
app
if
not
hasattr
(
app
,
'standard_html_footer'
):
app
.
manage_addDocument
(
'standard_html_footer'
,
''
,
''
,
None
,
"</body></html>"
)
get_transaction
().
commit
()
if
not
hasattr
(
app
,
'standard_html_header'
):
app
.
manage_addDocument
(
'standard_html_header'
,
''
,
''
,
None
,
"""<html><head><title><!--#if title-->
<!--#var title--><!--#else title-->
<!--#var id--><!--#/if title--></title></head><body>"""
)
get_transaction
().
commit
()
acls
=
app
.
AccessControlLists
.
_data
pw
=
'123'
if
acls
.
has_key
(
'manage'
):
acls
[
'manage'
][
'superuser'
]
=
pw
else
:
acls
[
'manage'
]
=
{
'superuser'
:
pw
}
##############################################################################
# Revision Log
#
# $Log: Main.py,v $
# Revision 1.2 1997/08/28 19:32:36 jim
# Jim told Paul to do it
#
# Revision 1.1 1997/08/13 18:58:39 jim
# initial
#
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