Created
April 14, 2015 21:56
-
-
Save xpostudio4/2e652375abffc55901bf to your computer and use it in GitHub Desktop.
This file contains hidden or 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 MyCommonlyUsedModel(models.Model): | |
class Meta: | |
managed = False | |
db_table = 'app_largetable' | |
f1 = models.Field(...) | |
f2 = models.Field(...) | |
# A model that allows the migrations framework to also manage the table | |
# Not sure if this actually works, but would allow for a more DRY approach | |
class MyManagedModel(MyCommonlyUsedModel): | |
class Meta: | |
managed = True | |
tb_table = 'app_largetable' | |
deferred_f3 = models.Field(...) | |
deferred_f4 = models.Field(...) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment