简体   繁体   English

与pas.plugin.sqlalchemy集成定制表

[英]Integration custom tables with pas.plugin.sqlalchemy

I'm trying to integrate custom table for authentication and role into PAS.plugin.sqlalchemy. 我正在尝试将用于身份验证和角色的自定义表集成到PAS.plugin.sqlalchemy中。

After customisation model.py I did manage to get my user table schema as we have in existing user table. 自定义model.py之后,我确实设法获得了现有用户表中的用户表架构。 But while installation of this pas, its create numbers tables inculding property table. 但是在安装此步骤时,其创建编号表包括属性表。 Property table linked with user table through foreign key. 属性表通过外键与用户表链接。 I don't have any property table in existing scenario. 我在现有方案中没有任何属性表。

By seeing my trackback I can see while doing SQL fetch pas looks for users and property table as join query. 通过查看引用,我可以看到在执行SQL提取操作时将用户和属性表作为联接查询。 we have data in our user (web_contact_auth) table but not in property table. 我们的用户(web_contact_auth)表中有数据,但属性表中没有数据。

u'SELECT TOP 1 web_contact_auth.contact_number AS web
_contact_auth_contact_number, web_contact_auth.password AS web_contact_auth_pass
word, principals.id AS principals_id, principals.type AS principals_type, princi
pals.zope_id AS principals_zope_id, web_contact_auth.password_reset_token AS web
_contact_auth_password_reset_token, web_contact_auth.password_reset_expiry AS we
b_contact_auth_password_reset_expiry \nFROM principals JOIN web_contact_auth ON
principals.id = web_contact_auth.contact_number \nWHERE web_contact_auth.contact
_number = ?' ('admin',)

My questiones are: how should I create data in property table ? 我的问题是:如何在属性表中创建数据? Is there anyway that I can ignore property table and just fetch data from user table only. 无论如何,我可以忽略属性表,而仅从用户表中获取数据。

Adavance Thanks your time for reading/reply. 感谢您的阅读/回复时间。

Regards 问候

WEBBYFOX WEBBYFOX

Just don't activate that plugin. 只是不要激活该插件。 I don't have a properties table. 我没有属性表。 In /acl_users/plugins/manage_active, Properties Plugins , I have sql as the last option. 在/ acl_users / plugins / manage_active的Properties Plugins ,我将sql作为最后一个选项。 I don't see anything else obvious. 我没有看到其他明显的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM