Skip to content

Commit

Permalink
Merge pull request kvesteri#207 from EdwardBetts/patch-1
Browse files Browse the repository at this point in the history
Assume Python 3 and write string without u prefix
  • Loading branch information
kvesteri authored Nov 18, 2018
2 parents cedad54 + 472513f commit eb65894
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,26 @@ In order to make your models versioned you need two things:
content = sa.Column(sa.UnicodeText)
article = Article(name=u'Some article', content=u'Some content')
article = Article(name='Some article', content='Some content')
session.add(article)
session.commit()
# article has now one version stored in database
article.versions[0].name
# u'Some article'
# 'Some article'
article.name = u'Updated name'
article.name = 'Updated name'
session.commit()
article.versions[1].name
# u'Updated name'
# 'Updated name'
# lets revert back to first version
article.versions[0].revert()
article.name
# u'Some article'
# 'Some article'
Resources
Expand Down

0 comments on commit eb65894

Please sign in to comment.