Thanks to the @univerio's comment, it appears that String
is imported by from rom import *
only on python2.x, quote from the docstring:
note:: this column type is only available in Python 2.x
For python3.x you need to use Text
instead.
class User(Model):
uName=Text(required=True)
password=Text(required=True)
As a side note, try not to use from xxx import *
wildcard imports - it's really a bad practice:
Wildcard imports (from import *) should be avoided, as they make it unclear which names are present in the namespace, confusing both readers and many automated tools. There is one defensible use case for a wildcard import, which is to republish an internal interface as part of a public API (for example, overwriting a pure Python implementation of an interface with the definitions from an optional accelerator module and exactly which definitions will be overwritten isn't known in advance).