|
|
|
@ -924,9 +924,9 @@ def new_question_md():
|
|
|
|
|
db.session.add(question)
|
|
|
|
|
db.session.commit()
|
|
|
|
|
if question.is_anonymous:
|
|
|
|
|
flash("You have just posted a posting anonymously", 'success')
|
|
|
|
|
flash("You have just posted a question anonymously", 'success')
|
|
|
|
|
else:
|
|
|
|
|
flash("You have just posted a posting", 'success')
|
|
|
|
|
flash("You have just posted a question", 'success')
|
|
|
|
|
return redirect(url_for('.index'))
|
|
|
|
|
return render_template('new_posting/new_mdquestion.html', form=form, default_body="", default_title="")
|
|
|
|
|
|
|
|
|
@ -989,9 +989,9 @@ def new_answer_md(question_id):
|
|
|
|
|
db.session.add(post)
|
|
|
|
|
db.session.commit()
|
|
|
|
|
if post.is_anonymous:
|
|
|
|
|
flash("You have just modified an answer anonymously", 'success')
|
|
|
|
|
flash("You have just posted an answer anonymously", 'success')
|
|
|
|
|
else:
|
|
|
|
|
flash("You have just modified an answer", 'success')
|
|
|
|
|
flash("You have just posted an answer", 'success')
|
|
|
|
|
return redirect(url_for('.view_question', question_id=question_id))
|
|
|
|
|
return render_template('new_posting/new_mdanswer.html', form=form, default_body="")
|
|
|
|
|
|
|
|
|
@ -1016,10 +1016,10 @@ def edit_answer_md(answer_id):
|
|
|
|
|
answer.recent_activity = datetime.utcnow()
|
|
|
|
|
db.session.add(answer)
|
|
|
|
|
db.session.commit()
|
|
|
|
|
if answer.is_anonymous:
|
|
|
|
|
flash("You have just posted a posting anonymously", 'success')
|
|
|
|
|
if post.is_anonymous:
|
|
|
|
|
flash("You have just modified an answer anonymously", 'success')
|
|
|
|
|
else:
|
|
|
|
|
flash("You have just posted a posting", 'success')
|
|
|
|
|
flash("You have just modified an answer", 'success')
|
|
|
|
|
return redirect(url_for('.index'))
|
|
|
|
|
return render_template('new_posting/new_mdanswer.html', form=form,
|
|
|
|
|
default_body=answer.body)
|
|
|
|
|