Skip to content

Commit

Permalink
Show all attribute options in show(Entity) call
Browse files Browse the repository at this point in the history
  • Loading branch information
sashaaero authored and kozlovsky committed Jan 12, 2019
1 parent 9e7cd21 commit 7a7719b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pony/orm/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2493,6 +2493,8 @@ def describe(attr):
options = []
if attr.args: options.append(', '.join(imap(str, attr.args)))
if attr.auto: options.append('auto=True')
for k, v in sorted(attr.kwargs.items()):
options.append('%s=%r' % (k, v))
if not isinstance(attr, PrimaryKey) and attr.is_unique: options.append('unique=True')
if attr.default is not None: options.append('default=%r' % attr.default)
if not options: options = ''
Expand Down

0 comments on commit 7a7719b

Please sign in to comment.