Created
March 18, 2014 09:29
-
-
Save bee-keeper/9616591 to your computer and use it in GitHub Desktop.
Example fixture for flatpage and flatpage migration example
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
#instantiation example | |
from django.contrib.flatpages.models import FlatPage | |
flatpage = FlatPage.objects.create(id=, title=, template_name=, content=) | |
flatpage.sites.add(2) | |
#fixture example | |
[ | |
{ | |
"pk": 1, | |
"model": "flatpages.flatpage", | |
"fields": { | |
"registration_required": false, | |
"title": "", | |
"url": "", | |
"template_name": "", | |
"sites": [], | |
"content": "", | |
"enable_comments": false | |
} | |
} | |
] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment