From ddecec588d2ca19b824f9d7051ac357099aa2067 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 24 Jan 2010 14:01:36 +0000 Subject: [PATCH] Renamed djangodb.DjangoDb to dbdjango.DbDjango svn: r14113 --- src/web/djangodb.py | 8 ++++---- src/web/grampsdb/views.py | 2 +- src/web/libdjango.py | 2 +- src/web/utils.py | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/web/djangodb.py b/src/web/djangodb.py index e1b019909..bb5b3ef7c 100644 --- a/src/web/djangodb.py +++ b/src/web/djangodb.py @@ -41,8 +41,8 @@ from web.libdjango import DjangoInterface # Example for running a report: # from ReportBase._CommandLineReport import run_report -# import djangodb -# db = djangodb.DjangoDb() +# import dbdjango +# db = dbdjango.DbDjango() # run_report(db, "ancestor_report", off="txt", of="ar.txt", pid="I37") # Imports for importing a file: @@ -55,7 +55,7 @@ def import_file(db, filename, callback): """ Import a file (such as a GEDCOM file) into the given db. - >>> import_file(DjangoDb(), "/home/user/Untitled_1.ged", lambda a: a) + >>> import_file(DbDjango(), "/home/user/Untitled_1.ged", lambda a: a) """ dbstate = DbState.DbState() climanager = CLIManager(dbstate, False) # do not load db_loader @@ -98,7 +98,7 @@ class Cursor(object): yield (item.handle, self.func(item)) yield None -class DjangoDb(DbReadBase, DbWriteBase): +class DbDjango(DbReadBase, DbWriteBase): """ A Gramps Database Backend. This replicates the grampsdb functions. """ diff --git a/src/web/grampsdb/views.py b/src/web/grampsdb/views.py index ff2b46942..8fad98abe 100644 --- a/src/web/grampsdb/views.py +++ b/src/web/grampsdb/views.py @@ -42,7 +42,7 @@ from django.db.models import Q import web from web.grampsdb.models import * from web.grampsdb.forms import * -from web.djangodb import DjangoDb +from web.dbdjango import DbDjango import gen.proxy from Utils import create_id diff --git a/src/web/libdjango.py b/src/web/libdjango.py index 84fb44a0c..d538854d4 100644 --- a/src/web/libdjango.py +++ b/src/web/libdjango.py @@ -46,7 +46,7 @@ import gen # tuple = dji.get_person(djperson) # gperson = lib.gen.Person(tuple) # OR -# gperson = djangodb.DjangoDb().get_person_from_handle(handle) +# gperson = dbdjango.DbDjango().get_person_from_handle(handle) #------------------------------------------------------------------------- # diff --git a/src/web/utils.py b/src/web/utils.py index b4b7aa89b..5b63a8333 100644 --- a/src/web/utils.py +++ b/src/web/utils.py @@ -46,7 +46,7 @@ from django.contrib.contenttypes.models import ContentType import web.grampsdb.models as models import web.grampsdb.forms as forms from web import libdjango -from web.djangodb import DjangoDb +from web.dbdjango import DbDjango #------------------------------------------------------------------------ # @@ -120,7 +120,7 @@ def get_person_from_handle(db, handle): def probably_alive(handle): return False - db = DjangoDb() + db = DbDjango() person = db.get_person_from_handle(handle) return Utils.probably_alive(person, db) @@ -146,7 +146,7 @@ class Table(object): >>> table.get_html() """ def __init__(self): - self.db = DjangoDb() + self.db = DbDjango() self.access = SimpleAccess(self.db) self.table = SimpleTable(self.access) class Doc(object): @@ -494,14 +494,14 @@ def get_title(place): return "" def person_get_birth_date(person): - #db = DjangoDb() + #db = DbDjango() #event = get_birth_or_fallback(db, db.get_person_from_handle(person.handle)) #if event: # return event.date return None def person_get_death_date(person): - #db = DjangoDb() + #db = DbDjango() #event = get_death_or_fallback(db, db.get_person_from_handle(person.handle)) #if event: # return event.date