Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
968108e16066
Commit
36bf9ff7
authored
Aug 13, 2009
by
Sylvain Thénault
Browse files
move underline_title to toolsutils
parent
39712da6f397
Changes
6
Hide whitespace changes
Inline
Side-by-side
__init__.py
View file @
968108e1
...
...
@@ -314,9 +314,6 @@ def target(obj):
except
AttributeError
:
return
neg_role
(
obj
.
role
)
def
underline_title
(
title
,
car
=
'-'
):
return
title
+
'
\n
'
+
(
car
*
len
(
title
))
class
CubicWebEventManager
(
object
):
"""simple event / callback manager.
...
...
cwctl.py
View file @
968108e1
...
...
@@ -11,9 +11,10 @@ from os.path import exists, join, isfile, isdir
from
logilab.common.clcommands
import
register_commands
,
pop_arg
from
logilab.common.shellutils
import
ASK
from
cubicweb
import
ConfigurationError
,
ExecutionError
,
BadCommandUsage
,
underline_title
from
cubicweb
import
ConfigurationError
,
ExecutionError
,
BadCommandUsage
from
cubicweb.cwconfig
import
CubicWebConfiguration
as
cwcfg
,
CONFIGURATIONS
from
cubicweb.toolsutils
import
Command
,
main_run
,
rm
,
create_dir
from
cubicweb.toolsutils
import
Command
,
main_run
,
rm
,
create_dir
,
underline_title
def
wait_process_end
(
pid
,
maxtry
=
10
,
waittime
=
1
):
"""wait for a process to actually die"""
...
...
devtools/devctl.py
View file @
968108e1
...
...
@@ -20,12 +20,13 @@ from logilab.common.textutils import splitstrip
from
logilab.common.shellutils
import
ASK
from
logilab.common.clcommands
import
register_commands
from
cubicweb
import
CW_SOFTWARE_ROOT
as
BASEDIR
,
BadCommandUsage
,
underline_title
from
cubicweb
import
CW_SOFTWARE_ROOT
as
BASEDIR
,
BadCommandUsage
from
cubicweb.__pkginfo__
import
version
as
cubicwebversion
from
cubicweb.toolsutils
import
Command
,
copy_skeleton
from
cubicweb.toolsutils
import
Command
,
copy_skeleton
,
underline_title
from
cubicweb.web.webconfig
import
WebConfiguration
from
cubicweb.server.serverconfig
import
ServerConfiguration
class
DevCubeConfiguration
(
ServerConfiguration
,
WebConfiguration
):
"""dummy config to get full library schema and entities"""
creating
=
True
...
...
server/serverctl.py
View file @
968108e1
...
...
@@ -14,8 +14,8 @@ from logilab.common.configuration import Configuration
from
logilab.common.clcommands
import
register_commands
,
cmd_run
,
pop_arg
from
logilab.common.shellutils
import
ASK
from
cubicweb
import
AuthenticationError
,
ExecutionError
,
ConfigurationError
,
underline_title
from
cubicweb.toolsutils
import
Command
,
CommandHandler
from
cubicweb
import
AuthenticationError
,
ExecutionError
,
ConfigurationError
from
cubicweb.toolsutils
import
Command
,
CommandHandler
,
underline_title
from
cubicweb.server
import
SOURCE_TYPES
from
cubicweb.server.utils
import
ask_source_config
from
cubicweb.server.serverconfig
import
USER_OPTIONS
,
ServerConfiguration
...
...
toolsutils.py
View file @
968108e1
...
...
@@ -21,6 +21,9 @@ from logilab.common.shellutils import ASK
from
cubicweb
import
warning
from
cubicweb
import
ConfigurationError
,
ExecutionError
def
underline_title
(
title
,
car
=
'-'
):
return
title
+
'
\n
'
+
(
car
*
len
(
title
))
def
iter_dir
(
directory
,
condition_file
=
None
,
ignore
=
()):
"""iterate on a directory"""
for
sub
in
listdir
(
directory
):
...
...
web/webctl.py
View file @
968108e1
...
...
@@ -8,8 +8,7 @@ web configuration
"""
__docformat__
=
"restructuredtext en"
from
cubicweb
import
underline_title
from
cubicweb.toolsutils
import
CommandHandler
from
cubicweb.toolsutils
import
CommandHandler
,
underline_title
from
logilab.common.shellutils
import
ASK
class
WebCreateHandler
(
CommandHandler
):
...
...
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