messing around with flask tutorial

123456789101112131415161718192021
  1. {% extends 'base.html' %}
  2. {% block header %}
  3. <h1>{% block title %}Edit "{{ post['title'] }}"{% endblock %}</h1>
  4. {% endblock %}
  5. {% block content %}
  6. <form method="post">
  7. <label for="title">Title</label>
  8. <input name="title" id="title"
  9. value="{{ request.form['title'] or post['title'] }}" required>
  10. <label for="body">Body</label>
  11. <textarea name="body" id="body">{{ request.form['body'] or post['body'] }}</textarea>
  12. <input type="submit" value="Save">
  13. </form>
  14. <hr>
  15. <form action="{{ url_for('blog.delete', id=post['id']) }}" method="post">
  16. <input class="danger" type="submit" value="Delete" onclick="return confirm('Are you sure?');">
  17. </form>
  18. {% endblock %}