Guest User

Untitled

a guest
Dec 9th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. def make_json(self):
  2. time_fmt = "%c"
  3. d = {"subject":self.subject,"content":self.content,
  4. "created":self.created.strftime(time_fmt),
  5. "last_modified":self.last_modified.strftime(time_fmt)}
  6. return d
  7.  
  8. def make_dict(self):
  9. time_format = "%c"
  10. d = {
  11. "subject":self.subject,"content":self.content,
  12. "created":self.created.strftime(time_format),
  13. "last_modified":self.last_modified.strftime(time_format)
  14. }
  15. return d
Add Comment
Please, Sign In to add comment