Example #1
0
def getApartment(id):
    user_query = ApartmentOwned.objects
    set_user_for_sharding(user_query, id)
    apartment = choice(user_query.all())
    # print apartment
    return apartment
Example #2
0
def getSubletUser(id):
    user_query = SubletUser.objects
    set_user_for_sharding(user_query, id)
    user = user_query.get(user_pk=id)
    # print user
    return user