开发者

NOT_IN_DB() by crud.read() web2py

开发者 https://www.devze.com 2023-03-28 00:52 出处:网络
i had a problem which has been solved here: web2py, Database relationships and permissions but when applying this solution i get by the crud.read() not the template_name but the id!

i had a problem which has been solved here: web2py, Database relationships and permissions

but when applying this solution i get by the crud.read() not the template_name but the id!

i use this :

def sender_profiles():
    f,v=auth.user_id,request.args(1)
    try: query=f and db.templates[f]==v or db.templates
    except: redirect(URL('error'))
    rows=db(query and db.templates.user_id == auth.user_id)(db.user_settings.active==True).select(db.user_settings.id,
                                                      db.user_settings.standard_template_id,
                                    开发者_开发知识库                  ...)
    return dict(rows=rows)

so it supposed to show : Standard Template : Letter but it shows :

Standard Template : 4

0

精彩评论

暂无评论...
验证码 换一张
取 消