Commit 2da7e63d916dadf21baae04f11e5feb4f42c12c4

  • avatar
  • arvind
  • Fri Feb 08 13:07:26 IST 2013
  • Tree SHA1: 60e5a24
  • Parent SHA1: b184f1f (PEP8 related fixes. Python follows indentation of mulitples of 4 not 2, so set your editors properly.)
  • raw diff | raw patch
Modularizing the code
						 - In the templating environment, flask provides url_for, etc helper functions, so we should leverage that as that makes code beautiful and modular.
  • Diff rendering mode:
  • inline
  • side by side

templates/history.html

10 <h3> JSON history </h3>10 <h3> JSON history </h3>
11 <ul>11 <ul>
12 {% for file in ls %}12 {% for file in ls %}
13 <li><a href="/editor?{{ file }}">{{ file }}</a></li>
13 <li><a href=" {{ url_for('editor') }}?{{ file }}">{{ file }}</a></li>
14 {% endfor %}14 {% endfor %}
15 </ul>15 </ul>
16 </div>
16 </div>
17</body>17</body>
18</html>18</html>