Skip to content

Instantly share code, notes, and snippets.

@bee-keeper
Created March 18, 2014 09:29
Show Gist options
  • Save bee-keeper/9616591 to your computer and use it in GitHub Desktop.
Save bee-keeper/9616591 to your computer and use it in GitHub Desktop.
Example fixture for flatpage and flatpage migration example
#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