Skip to content
Browse files

stubbing the templatetag and template

git-svn-id: http://django-flag.googlecode.com/svn/trunk@10 6223c904-8705-11dd-a5c9-f1483cedc3eb
  • Loading branch information...
1 parent bd9e5a7 commit 80f5b22fdcf6d193809592a9688bbd7aa7552a2a @gregnewman gregnewman committed Sep 20, 2008
Showing with 20 additions and 4 deletions.
  1. +8 −4 flag/templates/flag_form.html
  2. +12 −0 flag/templatetags/flagtags.py
View
12 flag/templates/flag_form.html
@@ -4,9 +4,13 @@
{% block content %}
<form method="POST" action="">
- <ul>
- {{ form.as_ul }}
- <li><input type="submit" value="Submit Flag" /></li>
- </ul>
+ <table>
+ <tr><td><textarea id="id_comment" rows="10" cols="40" name="comment"></td></tr>
+ <tr>
+ <td><input type="hidden" name="object_id" value="{{ object_id }}" />
+ <input type="hidden" name="next" value="{{ request.path }}" />
+ <input type="submit" value="Submit Flag" /></td>
+ </tr>
+ </table>
</form>
{% endblock %}
View
12 flag/templatetags/flagtags.py
@@ -0,0 +1,12 @@
+from django import template
+
+register = template.Library()
+
+def flag(context, obj):
+ return {
+ 'object_id': obj,
+ 'request': context['request'],
+ 'user': context['user'],
+ }
+
+register.inclusion_tag('templates/flag_form.html', takes_context=True)(flag)

0 comments on commit 80f5b22

Please sign in to comment.
Something went wrong with that request. Please try again.