示例#1
0
    def post(self, reuse):
        '''Upload a new reuse image'''
        ReuseEditPermission(reuse).test()
        parse_uploaded_image(reuse.image)
        reuse.save()

        return reuse
示例#2
0
文件: api.py 项目: anukat2015/udata
    def post(self, reuse):
        '''Upload a new reuse image'''
        ReuseEditPermission(reuse).test()
        parse_uploaded_image(reuse.image)
        reuse.save()

        return reuse
示例#3
0
文件: api.py 项目: anukat2015/udata
 def post(self):
     '''Upload a new avatar'''
     parse_uploaded_image(current_user.avatar)
     current_user.save()
     return {'image': current_user.avatar}
示例#4
0
文件: api.py 项目: ThomasG77/udata
 def post(self):
     '''Upload a new avatar'''
     parse_uploaded_image(current_user.avatar)
     current_user.save()
     return {'image': current_user.avatar}
示例#5
0
文件: api.py 项目: ThomasG77/udata
 def post(self, user):
     '''Upload a new avatar for a given user'''
     parse_uploaded_image(user.avatar)
     user.save()
     return {'image': user.avatar}
示例#6
0
 def put(self, org):
     '''Set the logo BBox'''
     EditOrganizationPermission(org).test()
     parse_uploaded_image(org.logo)
     return {'image': org.logo}
示例#7
0
 def post(self, org):
     '''Upload a new logo'''
     EditOrganizationPermission(org).test()
     parse_uploaded_image(org.logo)
     org.save()
     return {'image': org.logo}
示例#8
0
文件: api.py 项目: ThomasG77/udata
 def put(self, post):
     '''Set the image BBox'''
     parse_uploaded_image(post.image)
     return post
示例#9
0
文件: api.py 项目: ThomasG77/udata
 def post(self, post):
     '''Upload a new image'''
     parse_uploaded_image(post.image)
     post.save()
     return post
示例#10
0
文件: api.py 项目: anukat2015/udata
 def post(self, post):
     '''Upload a new image'''
     parse_uploaded_image(post.image)
     post.save()
     return post
示例#11
0
文件: api.py 项目: anukat2015/udata
 def put(self, post):
     '''Set the image BBox'''
     parse_uploaded_image(post.image)
     return post
示例#12
0
文件: api.py 项目: opendatateam/udata
 def put(self, org):
     '''Set the logo BBox'''
     EditOrganizationPermission(org).test()
     parse_uploaded_image(org.logo)
     return {'image': org.logo}
示例#13
0
文件: api.py 项目: opendatateam/udata
 def post(self, org):
     '''Upload a new logo'''
     EditOrganizationPermission(org).test()
     parse_uploaded_image(org.logo)
     org.save()
     return {'image': org.logo}
示例#14
0
文件: api.py 项目: javanna2000/udata
 def put(self, org):
     """Set the logo BBox"""
     EditOrganizationPermission(org).test()
     parse_uploaded_image(org.logo)
     return {"image": org.logo}
示例#15
0
文件: api.py 项目: javanna2000/udata
 def post(self, org):
     """Upload a new logo"""
     EditOrganizationPermission(org).test()
     parse_uploaded_image(org.logo)
     org.save()
     return {"image": org.logo}
示例#16
0
文件: api.py 项目: ldolberg/udata
 def post(self):
     """Upload a new avatar"""
     parse_uploaded_image(current_user.avatar)
     current_user.save()
     return {"image": current_user.avatar}