Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin_solidtable: "cannot import name table_field" with current web2py stable 2.9.6 #68

Open
ghost opened this issue Sep 4, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 4, 2014

Hi,

when using the plugin_solidtable with the current web2py stable 2.9.6 an import error is shown:

cannot import name table_field

This is caused by the import here:

from gluon.sqlhtml import table_field, represent, Row

The current gluon/sqlhtml.py of web2py is missing this table_field as described here:

http://comments.gmane.org/gmane.comp.python.web2py/129704

There is also a possible solution posted.

@GGAnderson
Copy link

One suggested solution is:

"put int in plugin_solidtable.py and add "import re" to that file."

Since gluon/sqlhtml.py is not likely to be changed to fix this, is anyone planning an update to this plugin?

@GGAnderson
Copy link

OK. So I tested this solution and it seems to work. Added 2 lines to modules/plugin_solidtable.py

import re
table_field = re.compile('[\w_]+\.[\w_]+')

I chose to add table_field statement to _create_td(...) function, where it is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant