From 396f51754848f0892e7410eb584e5424a17c16c9 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 27 May 2012 19:00:50 +0000 Subject: [PATCH] Refinements on interactive shell svn: r19677 --- src/webapp/shell.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/webapp/shell.py b/src/webapp/shell.py index 0d3063ee2..e86c6f327 100644 --- a/src/webapp/shell.py +++ b/src/webapp/shell.py @@ -1,3 +1,9 @@ +#### This sets up Django so you can interact with it via the Python +#### command line. +#### Start with something like: +#### $ PYTHONPATH=.. python -i shell.py +#### >>> Person.objects.all() + from django.conf import settings import webapp.settings as default_settings try: @@ -13,12 +19,13 @@ from webapp.reports import import_file from webapp.libdjango import DjangoInterface, totime, todate from gen.datehandler import displayer, parser import gen.lib +import cli.user db = DbDjango() dji = DjangoInterface() dd = displayer.display dp = parser.parse -#def Print(m): -# print m -#import_file(db, "/tmp/dblank-im_ged.ged", Print) +#import_file(db, +# "/home/dblank/gramps/trunk/example/gramps/data.gramps", +# cli.user.User())