Advertisement
hellsgate

Add SaveTheChange mixin as new base model

Sep 13th, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. from django.db import models
  2. from save_the_change.mixins import SaveTheChange
  3.  
  4. class MyBaseModel(SaveTheChange, models.Model):
  5.     class Meta:
  6.         abstract = True
  7.  
  8.  
  9. class MyModel(MyBaseModel):
  10.     title = models.CharField(max_length=100)
  11.     '''
  12.    other fields
  13.    '''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement