Skip to content

Instantly share code, notes, and snippets.

@hgdeoro
Created March 10, 2013 15:45
Show Gist options
  • Save hgdeoro/5129066 to your computer and use it in GitHub Desktop.
Save hgdeoro/5129066 to your computer and use it in GitHub Desktop.
Django Optimistic Locking: Add a VersionField to models
class Article(models.Model):
headline = models.CharField(max_length=100, default='Default headline')
pub_date = models.DateTimeField()
version = models.VersionField()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment