Commit 71a617fd authored by colmoneill's avatar colmoneill
parent c73a6f9c
......@@ -101,6 +101,7 @@ app.config['SECURITY_CHANGEABLE'] = True
# app.config['SECURITY_TRACKABLE'] = True
app.config['SECURITY_PASSWORD_HASH'] = PASSWORD_HASH
app.config['SECURITY_PASSWORD_SALT'] = PASSWORD_SALT
app.config['SECURITY_EMAIL_SENDER'] = 'hello@bemaker.eu'
app.config['MAIL_SERVER'] = MAIL_SERVER
app.config['MAIL_PORT'] = MAIL_PORT
......@@ -208,8 +209,8 @@ class User(db.Document, UserMixin):
meta = {'strict': False}
class ExtendedRegisterForm(RegisterForm):
first_name = StringField('prenom', validators=[DataRequired()])
last_name = StringField('nom', validators=[DataRequired()])
first_name = StringField('First Name', validators=[DataRequired()])
last_name = StringField('Last Name', validators=[DataRequired()])
def __unicode__(self):
return self.name
......@@ -236,6 +237,7 @@ def parse_md():
import sys
# cmd = 'cd ' + PATH_TO_REPO_HOME + 'app/md_sources/' + '&&' + 'python ' + PATH_TO_REPO_HOME + 'pythonParseImgFolder.py .'
# cd ~/webapps/flask && . venv/bin/activate && cd ~/webapps/flask/eu.bemaker.flask/app/md_sources/ && python pythonParseImgFolder.py . && deactivate
print('about to parse md files from')
cmd = 'cd ' + PATH_TO_VENV + ' && . venv/bin/activate' + ' && cd ' + PATH_TO_REPO_HOME + 'app/md_sources/ && python pythonParseImgFolder.py . && deactivate'
print(cmd)
os.system(cmd)
......@@ -287,11 +289,8 @@ def learn():
else :
language = session['language']
articles = (p for p in pages if 'published' in p.meta and language in p.meta and 'contenu_statique' not in p.meta)
# Show the 10 most recent articles, most recent first.
latest = sorted(articles, reverse=True,
key=lambda p: p.meta['published'])
return render_template("learn.html", articles=latest[:10])
articles = (p for p in pages if 'published' in p.meta and 'contenu_statique' not in p.meta and 'type' in p.meta)
return render_template("learn.html", articles=articles)
@app.route('/learn/<path:path>/')
def page(path):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment