mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Replaced print statement by print function (forward compatibility syntax).
This commit is contained in:
@@ -299,7 +299,7 @@ class ManagementUtility(object):
|
||||
|
||||
# subcommand
|
||||
if cword == 1:
|
||||
print ' '.join(sorted(filter(lambda x: x.startswith(curr), subcommands)))
|
||||
print(' '.join(sorted(filter(lambda x: x.startswith(curr), subcommands))))
|
||||
# subcommand options
|
||||
# special case: the 'help' subcommand has no options
|
||||
elif cwords[0] in subcommands and cwords[0] != 'help':
|
||||
@@ -333,7 +333,7 @@ class ManagementUtility(object):
|
||||
# append '=' to options which require args
|
||||
if option[1]:
|
||||
opt_label += '='
|
||||
print opt_label
|
||||
print(opt_label)
|
||||
sys.exit(1)
|
||||
|
||||
def execute(self):
|
||||
|
||||
@@ -173,7 +173,7 @@ def emit_post_sync_signal(created_models, verbosity, interactive, db):
|
||||
for app in models.get_apps():
|
||||
app_name = app.__name__.split('.')[-2]
|
||||
if verbosity >= 2:
|
||||
print "Running post-sync handlers for application", app_name
|
||||
print("Running post-sync handlers for application %s" % app_name)
|
||||
models.signals.post_syncdb.send(sender=app, app=app,
|
||||
created_models=created_models, verbosity=verbosity,
|
||||
interactive=interactive, db=db)
|
||||
|
||||
@@ -82,9 +82,9 @@ Examples:
|
||||
""" % FASTCGI_OPTIONS
|
||||
|
||||
def fastcgi_help(message=None):
|
||||
print FASTCGI_HELP
|
||||
print(FASTCGI_HELP)
|
||||
if message:
|
||||
print message
|
||||
print(message)
|
||||
return False
|
||||
|
||||
def runfastcgi(argset=[], **kwargs):
|
||||
@@ -103,11 +103,11 @@ def runfastcgi(argset=[], **kwargs):
|
||||
try:
|
||||
import flup
|
||||
except ImportError as e:
|
||||
print >> sys.stderr, "ERROR: %s" % e
|
||||
print >> sys.stderr, " Unable to load the flup package. In order to run django"
|
||||
print >> sys.stderr, " as a FastCGI application, you will need to get flup from"
|
||||
print >> sys.stderr, " http://www.saddi.com/software/flup/ If you've already"
|
||||
print >> sys.stderr, " installed flup, then make sure you have it in your PYTHONPATH."
|
||||
sys.stderr.write("ERROR: %s\n" % e)
|
||||
sys.stderr.write(" Unable to load the flup package. In order to run django\n")
|
||||
sys.stderr.write(" as a FastCGI application, you will need to get flup from\n")
|
||||
sys.stderr.write(" http://www.saddi.com/software/flup/ If you've already\n")
|
||||
sys.stderr.write(" installed flup, then make sure you have it in your PYTHONPATH.\n")
|
||||
return False
|
||||
|
||||
flup_module = 'server.' + options['protocol']
|
||||
@@ -136,7 +136,7 @@ def runfastcgi(argset=[], **kwargs):
|
||||
module = importlib.import_module('.%s' % flup_module, 'flup')
|
||||
WSGIServer = module.WSGIServer
|
||||
except Exception:
|
||||
print "Can't import flup." + flup_module
|
||||
print("Can't import flup." + flup_module)
|
||||
return False
|
||||
|
||||
# Prep up and go
|
||||
|
||||
Reference in New Issue
Block a user