create articles dir if it doesn't exist
This commit is contained in:
parent
4ee9f1b483
commit
13fd04b53f
|
@ -99,6 +99,8 @@ class ArticlesDirectory(Directory):
|
|||
form.render()
|
||||
else:
|
||||
def submit():
|
||||
if not os.path.exists(os.path.join(get_publisher().app_dir, 'articles')):
|
||||
os.mkdir(os.path.join(get_publisher().app_dir, 'articles'))
|
||||
text = form.get_widget('text').parse()
|
||||
file(article_rst, 'w').write(text)
|
||||
parts = docutils.examples.html_parts(text, input_encoding = 'iso-8859-1',
|
||||
|
|
Reference in New Issue