Permalink
Browse files

Urgent bugfix due to personal stupidity.

Note to self:
If you change any parameter names, you need to fix the templates that
contain any "url_for" calls. That took me entirely too long to figure out!!
Also, added a simple-debug.py for quick debugging. Derp, derp.
  • Loading branch information...
1 parent a6573b7 commit 8b347ba640f525cc400ce54125d1d5852f657c77 @hellerbarde hellerbarde committed May 31, 2012
Showing with 14 additions and 10 deletions.
  1. +4 −0 simple-debug.py
  2. +5 −5 templates/admin.html
  3. +2 −2 templates/edit.html
  4. +1 −1 templates/post_preview.html
  5. +2 −2 templates/view.html
View
@@ -0,0 +1,4 @@
+#!/usr/bin/env python2
+import simple
+simple.app.debug = True
+simple.app.run()
View
@@ -15,9 +15,9 @@
{% for draft in drafts %}
<li id="post-{{ draft.id }}">
<h3>
- <a href="{{ url_for('edit', id=draft.id) }}">{{ draft.title }}</a>
+ <a href="{{ url_for('edit', post_id=draft.id) }}">{{ draft.title }}</a>
<span class="links">
- <a href="{{ url_for('delete', id=draft.id) }}" class="admin-delete" data-confirm="Are you sure?" rel="nofollow">x</a>
+ <a href="{{ url_for('delete', post_id=draft.id) }}" class="admin-delete" data-confirm="Are you sure?" rel="nofollow">x</a>
</span>
</h3>
</li>
@@ -31,15 +31,15 @@
{% for post in posts %}
<li id="post-{{ post.id }}">
<h3>
- <a href="{{ url_for('edit', id=post.id) }}">{{ post.title }}</a>
+ <a href="{{ url_for('edit', post_id=post.id) }}">{{ post.title }}</a>
<span class="links">
<a href="{{ url_for('view_post_slug', slug=post.slug) }}" class="admin-view">view</a>
- <a href="{{ url_for('delete', id=post.id) }}" class="admin-delete" data-confirm="Are you sure?"
+ <a href="{{ url_for('delete', post_id=post.id) }}" class="admin-delete" data-confirm="Are you sure?"
data-method="delete" rel="nofollow">x</a>
</span>
</h3>
</li>
{% endfor %}
</ul>
</div>
-{% endblock %}
+{% endblock %}
View
@@ -27,7 +27,7 @@
<form accept-charset="UTF-8" action="" class="edit_post" id="edit_post" method="post">
<div class="sidebar-nav-fixed">
<p><a class="btn btn-inverse" href="{{ url_for("admin") }}">Admin</a></p>
- <p><a class="btn btn-inverse" href="{{ url_for('delete', id=post.id, next="admin") }}">Delete</a> </p>
+ <p><a class="btn btn-inverse" href="{{ url_for('delete', post_id=post.id, next="admin") }}">Delete</a> </p>
<p>
<label for="post_draft">Draft</label>
<input name="post_draft" type="hidden" value="0" /><input id="post_draft" name="post_draft" type="checkbox" value="1" {% if post.draft %}checked{% endif %} />
@@ -80,7 +80,7 @@
<a href="{{ url_for('admin') }}">Admin</a>
</div>
<div>
- <a href="{{ url_for('delete', id=post.id, next="admin" ) }}" class="delete-bar" data-confirm="Are you sure?" rel="nofollow">Delete</a>
+ <a href="{{ url_for('delete', post_id=post.id, next="admin" ) }}" class="delete-bar" data-confirm="Are you sure?" rel="nofollow">Delete</a>
</div>
</div>
@@ -22,4 +22,4 @@
</div>
</div>
</body>
-</html>
+</html>
View
@@ -7,7 +7,7 @@
<br />
<li>
<p>
- <a href="{{ url_for('edit', id=post.id) }}">Edit post</a>
+ <a href="{{ url_for('edit', post_id=post.id) }}">Edit post</a>
</p>
</li>
{% endif %}
@@ -32,4 +32,4 @@
<a class="btn btn-inverse" href="{{ url_for('index', page=pid) }}">Back to Blog</a>
</div>
</section>
-{% endblock %}
+{% endblock %}

0 comments on commit 8b347ba

Please sign in to comment.