Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
361c5e62
Commit
361c5e62
authored
13 years ago
by
Xavier Morel
Browse files
Options
Downloads
Patches
Plain Diff
[IMP] reorganize standalone script's options a bit
bzr revid: xmo@openerp.com-20110922150218-mhmuk4vn83hro402
parent
2d8c2737
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openerp-web.py
+25
-18
25 additions, 18 deletions
openerp-web.py
with
25 additions
and
18 deletions
openerp-web.py
+
25
−
18
View file @
361c5e62
...
...
@@ -15,8 +15,6 @@ if path_addons not in sys.path:
sys
.
path
.
insert
(
0
,
path_addons
)
optparser
=
optparse
.
OptionParser
()
optparser
.
add_option
(
"
-p
"
,
"
--port
"
,
dest
=
"
socket_port
"
,
default
=
8002
,
help
=
"
listening port
"
,
type
=
"
int
"
,
metavar
=
"
NUMBER
"
)
optparser
.
add_option
(
"
-s
"
,
"
--session-path
"
,
dest
=
"
session_storage
"
,
default
=
os
.
path
.
join
(
tempfile
.
gettempdir
(),
"
oe-sessions
"
),
help
=
"
directory used for session storage
"
,
metavar
=
"
DIR
"
)
...
...
@@ -28,22 +26,31 @@ optparser.add_option("--db-filter", dest="dbfilter", default='.*',
help
=
"
Filter listed database
"
,
metavar
=
"
REGEXP
"
)
optparser
.
add_option
(
'
--addons-path
'
,
dest
=
'
addons_path
'
,
default
=
path_addons
,
help
=
"
Path do addons directory
"
,
metavar
=
"
PATH
"
)
optparser
.
add_option
(
'
--no-serve-static
'
,
dest
=
'
serve_static
'
,
default
=
True
,
action
=
'
store_false
'
,
help
=
"
Do not serve static files via this server
"
)
optparser
.
add_option
(
'
--reloader
'
,
dest
=
'
reloader
'
,
default
=
False
,
action
=
'
store_true
'
,
help
=
"
Reload application when python files change
"
)
optparser
.
add_option
(
"
--log-level
"
,
dest
=
"
log_level
"
,
default
=
'
debug
'
,
help
=
"
Log level
"
,
metavar
=
"
LOG_LEVEL
"
)
optparser
.
add_option
(
"
--log-config
"
,
dest
=
"
log_config
"
,
default
=
''
,
help
=
"
Log config file
"
,
metavar
=
"
LOG_CONFIG
"
)
optparser
.
add_option
(
'
--multi-threaded
'
,
dest
=
'
threaded
'
,
default
=
False
,
action
=
'
store_true
'
,
help
=
"
Use multiple threads to handle requests
"
)
optparser
.
add_option
(
'
--proxy-mode
'
,
dest
=
'
proxy_mode
'
,
default
=
False
,
action
=
'
store_true
'
,
help
=
"
Enable correct behavior when behind a reverse Proxy
"
)
server_options
=
optparse
.
OptionGroup
(
optparser
,
"
Server configuration
"
)
server_options
.
add_option
(
"
-p
"
,
"
--port
"
,
dest
=
"
socket_port
"
,
default
=
8002
,
help
=
"
listening port
"
,
type
=
"
int
"
,
metavar
=
"
NUMBER
"
)
server_options
.
add_option
(
'
--reloader
'
,
dest
=
'
reloader
'
,
default
=
False
,
action
=
'
store_true
'
,
help
=
"
Reload application when python files change
"
)
server_options
.
add_option
(
'
--no-serve-static
'
,
dest
=
'
serve_static
'
,
default
=
True
,
action
=
'
store_false
'
,
help
=
"
Do not serve static files via this server
"
)
server_options
.
add_option
(
'
--multi-threaded
'
,
dest
=
'
threaded
'
,
default
=
False
,
action
=
'
store_true
'
,
help
=
"
Spawn one thread per HTTP request
"
)
server_options
.
add_option
(
'
--proxy-mode
'
,
dest
=
'
proxy_mode
'
,
default
=
False
,
action
=
'
store_true
'
,
help
=
"
Enable correct behavior when behind a reverse proxy
"
)
optparser
.
add_option_group
(
server_options
)
logging_opts
=
optparse
.
OptionGroup
(
optparser
,
"
Logging
"
)
logging_opts
.
add_option
(
"
--log-level
"
,
dest
=
"
log_level
"
,
type
=
"
choice
"
,
default
=
'
debug
'
,
help
=
"
Global logging level
"
,
metavar
=
"
LOG_LEVEL
"
,
choices
=
[
'
debug
'
,
'
info
'
,
'
warning
'
,
'
error
'
,
'
critical
'
])
logging_opts
.
add_option
(
"
--log-config
"
,
dest
=
"
log_config
"
,
help
=
"
Logging configuration file
"
,
metavar
=
"
FILE
"
)
optparser
.
add_option_group
(
logging_opts
)
import
web.common.dispatch
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment