Guest User

Untitled

a guest
May 25th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. # assuming variable html contains the new HTML file,
  2. #+ and var id the ID of the flatpage
  3. from django.contrib.flatpages.models import FlatPage
  4. fp = FlatPage.objects.get (id=id)
  5. fp.content = html
  6. fp.save()
Add Comment
Please, Sign In to add comment