def __init__(self, import_io, username=None): """work on getting an importer instance""" self.file_handle = import_io self.username = username # we need to get our list of hashes to make sure we check for dupes self.hash_list = set([b[0] for b in BmarkMgr.hash_list(username=username)])
def __init__(self, import_io, username=None): """work on getting an importer instance""" self.file_handle = import_io self.username = username # we need to get our list of hashes to make sure we check for dupes self.hash_list = set( [b[0] for b in BmarkMgr.hash_list(username=username)])
def extension_sync(request): """Return a list of the bookmarks we know of in the system For right now, send down a list of hash_ids """ username = request.user.username hash_list = BmarkMgr.hash_list(username=username) return {'hash_list': [hash[0] for hash in hash_list]}
def extension_sync(request): """Return a list of the bookmarks we know of in the system For right now, send down a list of hash_ids """ username = request.user.username hash_list = BmarkMgr.hash_list(username=username) return { 'hash_list': [hash[0] for hash in hash_list] }