Created
November 12, 2019 05:26
-
-
Save ekiara/ac1ac0a54845ea81014a9b91ab4de23b to your computer and use it in GitHub Desktop.
Django migration specifically to load fixture data
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
# Django migration specifically to load fixture data | |
# https://dev.to/guin/writing-a-django-data-migration-with-real-world-example-40m | |
# https://docs.djangoproject.com/en/1.7/howto/initial-data/#automatically-loading-initial-data-fixtures | |
# https://stackoverflow.com/questions/25960850/loading-initial-data-with-django-1-7-and-data-migrations <-- THIS | |
python manage.py makemigrations --empty <yourapp> --name load_intial_data | |
/// EDIT YOUR MIGRATION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment