Created
October 29, 2015 17:00
-
-
Save xarimanx/b9762b194a4d29c1aef5 to your computer and use it in GitHub Desktop.
auto key for django fixtures
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
Use "pk: null" instead of "pk: 1" (or whatever), which will result in the PK being set to None, and when the object is saved a primary key will be assigned. | |
This works for YAML at least, I'm guessing you're using that if you are creating by hand. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment