コード例 #1
0
ファイル: user.py プロジェクト: nous-consulting/ututi
    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)
コード例 #2
0
ファイル: registration.py プロジェクト: nous-consulting/ututi
 def logo(self, id, size):
     return serve_logo('registration', id, width=size, square=True,
                       default_img_path="public/img/user_default.png",
                       cache=False)
コード例 #3
0
ファイル: base.py プロジェクト: nous-consulting/ututi
 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)
コード例 #4
0
ファイル: anonymous.py プロジェクト: nous-consulting/ututi
 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)
コード例 #5
0
ファイル: group.py プロジェクト: nous-consulting/ututi
 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")
コード例 #6
0
ファイル: theming.py プロジェクト: nous-consulting/ututi
 def header_logo(self, id, size=None):
     return serve_logo('theme', int(id), width=size, square=True, cache=False)
コード例 #7
0
ファイル: structure.py プロジェクト: nous-consulting/ututi
 def logo(self, id, width=None, height=None):
     return serve_logo('locationtag', int(id), width=width, height=height,
                      cache=False)