예제 #1
0
 def pictures_for_userid(cls, fb_id):
     print fb_id
     persistence_controller = PersistenceController()
     user = persistence_controller.get_user(fb_id)
     print user.fb_id
     pictures_list = persistence_controller.get_pictures_by_user(user)
     print pictures_list
     return pictures_list
예제 #2
0
 def pictures_for_userid(cls, fb_id):
     print fb_id
     persistence_controller = PersistenceController()
     user = persistence_controller.get_user(fb_id)
     print user.fb_id
     pictures_list = persistence_controller.get_pictures_by_user(user)
     print pictures_list
     return pictures_list
예제 #3
0
def populate():
    ## creating user
    fb_id = '677153213'
    persistence_controller = PersistenceController()
    persistence_controller.new_user(fb_id=fb_id)

    users = UserModel.objects.all()
    user0 = users[0]

    auth = Auth(user0.fb_id)
    scrapper = Scrapper(auth)
    pictures = scrapper.scrap_album()

    persistence_controller = PersistenceController()
    persistence_controller.add_pictures(user=user0, pictures=pictures)
예제 #4
0
def populate():
    ## creating user
    fb_id = '677153213'
    persistence_controller = PersistenceController()
    persistence_controller.new_user(fb_id=fb_id)

    users = UserModel.objects.all()
    user0 = users[0]

    auth = Auth(user0.fb_id)
    scrapper = Scrapper(auth)
    pictures = scrapper.scrap_album()

    persistence_controller = PersistenceController()
    persistence_controller.add_pictures(user=user0, pictures=pictures)