Ticket #4704: runapp.patch
File runapp.patch, 1.4 KB (added by , 17 years ago) |
---|
-
django/core/management.py
1294 1294 transaction.commit_unless_managed() 1295 1295 createcachetable.args = "[tablename]" 1296 1296 1297 def run_app(args): 1298 "Runs a func from module in django context" 1299 from django.db.models.loading import get_models 1300 loaded_models = get_models() 1301 1302 name, func = args[0], args[1] 1303 module = __import__(name, globals(), locals(), name) 1304 module.__getattribute__(func)() 1305 1306 run_app.help_doc = 'Runs a func from module in django context' 1307 run_app.args = "name, func" 1308 1297 1309 def run_shell(use_plain=False): 1298 1310 "Runs a Python interactive interpreter. Tries to use IPython, if it's available." 1299 1311 # XXX: (Temporary) workaround for ticket #1796: force early loading of all … … 1525 1537 'runfcgi': runfcgi, 1526 1538 'runserver': runserver, 1527 1539 'shell': run_shell, 1540 'runapp': run_app, 1528 1541 'sql': get_sql_create, 1529 1542 'sqlall': get_sql_all, 1530 1543 'sqlclear': get_sql_delete, … … 1671 1684 action_mapping[action](addr, port, options.use_reloader, options.admin_media_path) 1672 1685 elif action == 'runfcgi': 1673 1686 action_mapping[action](args[1:]) 1687 elif action == 'runapp': 1688 action_mapping[action](args[1:]) 1674 1689 elif action == 'sqlinitialdata': 1675 1690 print action_mapping[action](args[1:]) 1676 1691 elif action == 'sqlflush':