Beispiel #1
0
    def logo(self, id, width=None, height=None):
        user = find_user(id)
        if user is None:
            abort(404)

        if user.is_teacher:
            img_path = 'public/img/teacher_default.png'
        else:
            img_path = 'public/img/user_default.png'

        return serve_logo('user', user.id, width=width, square=True,
                          default_img_path=img_path, cache=False)
Beispiel #2
0
 def logo(self, id, size):
     return serve_logo('registration', id, width=size, square=True,
                       default_img_path="public/img/user_default.png",
                       cache=False)
Beispiel #3
0
 def logo(self, width=None, height=None):
     return serve_logo('user', c.user.id, width=width, height=height,
                       default_img_path="public/img/user_default.png",
                       cache=False)
Beispiel #4
0
 def logo(self, width=None, height=None):
     return serve_logo('user', width=width, height=height,
             default_img_path="public/images/details/icon_user.png",
             cache=False)
Beispiel #5
0
 def logo(self, id, width=None, height=None):
     return serve_logo('group', id, width=width, square=True,
             default_img_path="public/images/details/icon_group_large.png")
Beispiel #6
0
 def header_logo(self, id, size=None):
     return serve_logo('theme', int(id), width=size, square=True, cache=False)
Beispiel #7
0
 def logo(self, id, width=None, height=None):
     return serve_logo('locationtag', int(id), width=width, height=height,
                      cache=False)