This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This is an extension of the technique first detailed here: | |
http://sedimental.org/remap.html#add_common_keys | |
In short, it calls remap on each container, back to front, using the accumulating | |
previous values as the default for the current iteration. | |
""" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UUIDIdMixin(models.Model): | |
class Meta: | |
abstract = True | |
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) | |
class Body(UUIDIdMixin): | |
name = models.CharField(max_length=140) | |
description = models.CharField(max_length=280) |