コード例 #1
0
ファイル: resource.py プロジェクト: StasEvseev/adminbuy
    def post(self):
        data = request.json['data']
        user = g.user

        profile = SettingsService.setting_to_user(user)
        profile.rate_gross = data['rate_gross']
        profile.rate_retail = data['rate_retail']

        db.session.add(profile)
        db.session.commit()

        return profile
コード例 #2
0
ファイル: service.py プロジェクト: StasEvseev/adminbuy
def rate_gross():
    from applications.settings.service import SettingsService
    user = g.user
    profile = SettingsService.setting_to_user(user)
    return profile.rate_gross
コード例 #3
0
ファイル: resource.py プロジェクト: StasEvseev/adminbuy
    def get(self):
        user = g.user

        return SettingsService.setting_to_user(user)