Renamed djangodb.DjangoDb to dbdjango.DbDjango

svn: r14113
This commit is contained in:
Doug Blank 2010-01-24 14:01:36 +00:00
parent e5d14f59c1
commit ddecec588d
4 changed files with 11 additions and 11 deletions

View File

@ -41,8 +41,8 @@ from web.libdjango import DjangoInterface
# Example for running a report: # Example for running a report:
# from ReportBase._CommandLineReport import run_report # from ReportBase._CommandLineReport import run_report
# import djangodb # import dbdjango
# db = djangodb.DjangoDb() # db = dbdjango.DbDjango()
# run_report(db, "ancestor_report", off="txt", of="ar.txt", pid="I37") # run_report(db, "ancestor_report", off="txt", of="ar.txt", pid="I37")
# Imports for importing a file: # 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 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() dbstate = DbState.DbState()
climanager = CLIManager(dbstate, False) # do not load db_loader climanager = CLIManager(dbstate, False) # do not load db_loader
@ -98,7 +98,7 @@ class Cursor(object):
yield (item.handle, self.func(item)) yield (item.handle, self.func(item))
yield None yield None
class DjangoDb(DbReadBase, DbWriteBase): class DbDjango(DbReadBase, DbWriteBase):
""" """
A Gramps Database Backend. This replicates the grampsdb functions. A Gramps Database Backend. This replicates the grampsdb functions.
""" """

View File

@ -42,7 +42,7 @@ from django.db.models import Q
import web import web
from web.grampsdb.models import * from web.grampsdb.models import *
from web.grampsdb.forms import * from web.grampsdb.forms import *
from web.djangodb import DjangoDb from web.dbdjango import DbDjango
import gen.proxy import gen.proxy
from Utils import create_id from Utils import create_id

View File

@ -46,7 +46,7 @@ import gen
# tuple = dji.get_person(djperson) # tuple = dji.get_person(djperson)
# gperson = lib.gen.Person(tuple) # gperson = lib.gen.Person(tuple)
# OR # OR
# gperson = djangodb.DjangoDb().get_person_from_handle(handle) # gperson = dbdjango.DbDjango().get_person_from_handle(handle)
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@ -46,7 +46,7 @@ from django.contrib.contenttypes.models import ContentType
import web.grampsdb.models as models import web.grampsdb.models as models
import web.grampsdb.forms as forms import web.grampsdb.forms as forms
from web import libdjango 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): def probably_alive(handle):
return False return False
db = DjangoDb() db = DbDjango()
person = db.get_person_from_handle(handle) person = db.get_person_from_handle(handle)
return Utils.probably_alive(person, db) return Utils.probably_alive(person, db)
@ -146,7 +146,7 @@ class Table(object):
>>> table.get_html() >>> table.get_html()
""" """
def __init__(self): def __init__(self):
self.db = DjangoDb() self.db = DbDjango()
self.access = SimpleAccess(self.db) self.access = SimpleAccess(self.db)
self.table = SimpleTable(self.access) self.table = SimpleTable(self.access)
class Doc(object): class Doc(object):
@ -494,14 +494,14 @@ def get_title(place):
return "" return ""
def person_get_birth_date(person): def person_get_birth_date(person):
#db = DjangoDb() #db = DbDjango()
#event = get_birth_or_fallback(db, db.get_person_from_handle(person.handle)) #event = get_birth_or_fallback(db, db.get_person_from_handle(person.handle))
#if event: #if event:
# return event.date # return event.date
return None return None
def person_get_death_date(person): def person_get_death_date(person):
#db = DjangoDb() #db = DbDjango()
#event = get_death_or_fallback(db, db.get_person_from_handle(person.handle)) #event = get_death_or_fallback(db, db.get_person_from_handle(person.handle))
#if event: #if event:
# return event.date # return event.date