Skip to content

Instantly share code, notes, and snippets.

@anthonydillon
Last active October 12, 2016 16:00
Show Gist options
  • Save anthonydillon/9511e9c4edd98a55041e0eae1fabc88b to your computer and use it in GitHub Desktop.
Save anthonydillon/9511e9c4edd98a55041e0eae1fabc88b to your computer and use it in GitHub Desktop.
from website.models import Page
from website.db_helpers import import_page_from_json_file
if Page.objects.filter(url="download").exists():
Page.objects.get(url="download").delete()
import_page_from_json_file('download.json')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment