Commit 778bf0116c8c05e3e00a77a9c421c312092fb06a

Authored by Andrew Yanovych
1 parent e6a948d0

added method for extracting file contents

... ... @@ -22,6 +22,11 @@ from .initial_data import (
22 22
23 23 TIMEZONE = timezone('Europe/Kiev')
24 24
  25 +
  26 +def get_file_contents(path):
  27 + with open(path, 'r') as f:
  28 + return unicode(f.read()) or u''
  29 +
25 30 def get_date():
26 31 return datetime.now().isoformat()
27 32
... ...
Please register or login to post a comment