allow overwriting of CSS definitions with reuse of standard file

This commit is contained in:
Helmut Merz 2012-08-04 09:22:54 +02:00
parent ed06f60790
commit 427eb9d3b4

View file

@ -64,9 +64,13 @@ class WordDocument(Base):
@Lazy
def css(self):
fn = os.path.join(os.path.dirname(__file__), 'word.css')
return self.loadCSS()
def loadCSS(self, filename='word.css', path=None):
if path is None:
path = os.path.dirname(__file__)
fn = os.path.join(path, filename)
f = open(fn, 'r')
css = f.read()
f.close()
return css