Example #1
0
def generate_anim_types(request):
    SINGLE_THUMB_ANIMATION_TYPE_TODO_REMOVE = AnimationType(
        version=1,
        photo_width=180,
        photo_height=120,
        frame_width=45,
        frame_height=45,
        json_info=dumps([[0, 8], [45, 8], [90, 8], [135, 8],
                         [0,68], [45,68], [90,68], [135,68]]),
        type='thumb'
    )
    SINGLE_THUMB_ANIMATION_TYPE_TODO_REMOVE.put()

    SINGLE_ANIMATION_TYPE_TODO_REMOVE = AnimationType(
        version=1,
        photo_width=1200,
        photo_height=800,
        frame_width=300,
        frame_height=400,
        json_info=dumps([[0,  0], [300,  0], [600,  0], [900,  0],
                         [0,400], [300,400], [600,400], [900,400]]),
        type='photo',
        thumb_anim=SINGLE_THUMB_ANIMATION_TYPE_TODO_REMOVE
    )
    SINGLE_ANIMATION_TYPE_TODO_REMOVE.put()
    return HttpResponse('generate_anim_types(): ok!')
Example #2
0
def get_anim_type_for_photo_size(width, height):
    return AnimationType.all().filter('type =', 'photo').\
                               filter('photo_height =', height).\
                               filter('photo_width =', width).\
                               fetch(1)[0]