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:
# 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.
"""

View File

@ -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

View File

@ -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)
#-------------------------------------------------------------------------
#

View File

@ -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