dji.rebuild_cache(item) where item is Person; need rest of items
svn: r19590
This commit is contained in:
parent
85dcc46d39
commit
12f00bf61d
@ -1466,6 +1466,14 @@ class DjangoInterface(object):
|
|||||||
self.add_attribute_list(event, attribute_list)
|
self.add_attribute_list(event, attribute_list)
|
||||||
self.add_media_ref_list(event, media_list)
|
self.add_media_ref_list(event, media_list)
|
||||||
self.add_citation_list(event, citation_list)
|
self.add_citation_list(event, citation_list)
|
||||||
|
|
||||||
|
def rebuild_cache(self, item):
|
||||||
|
if isinstance(item, models.Person):
|
||||||
|
raw = self.get_person(item)
|
||||||
|
item.cache = base64.encodestring(cPickle.dumps(raw))
|
||||||
|
item.save()
|
||||||
|
else:
|
||||||
|
raise Exception("Don't know how to cache '%s'" % type(item))
|
||||||
|
|
||||||
def rebuild_caches(self, callback=None):
|
def rebuild_caches(self, callback=None):
|
||||||
"""
|
"""
|
||||||
|
@ -9,10 +9,11 @@ except RuntimeError:
|
|||||||
from webapp.grampsdb.models import *
|
from webapp.grampsdb.models import *
|
||||||
from webapp.dbdjango import DbDjango
|
from webapp.dbdjango import DbDjango
|
||||||
from webapp.reports import import_file
|
from webapp.reports import import_file
|
||||||
|
from webapp.libdjango import DjangoInterface
|
||||||
|
|
||||||
db = DbDjango()
|
db = DbDjango()
|
||||||
|
dji = DjangoInterface()
|
||||||
|
|
||||||
def Print(m):
|
#def Print(m):
|
||||||
print m
|
# print m
|
||||||
|
|
||||||
#import_file(db, "/tmp/dblank-im_ged.ged", Print)
|
#import_file(db, "/tmp/dblank-im_ged.ged", Print)
|
||||||
|
Loading…
Reference in New Issue
Block a user