annotate gpp/templates/bio/edit_profile.html @ 318:c550933ff5b6

Fix a bug where you'd get an error when trying to delete a forum thread (topic does not exist). Apparently when you call topic.delete() the posts would get deleted, but the signal handler for each one would run, and it would try to update the topic's post count or something, but the topic was gone? Reworked the code a bit and explicitly delete the posts first. I also added a sync() call on the parent forum since post counts were not getting adjusted.
author Brian Neal <bgneal@gmail.com>
date Sat, 05 Feb 2011 21:46:52 +0000
parents 88b2b9cb8c1f
children 3c48a555298d
rev   line source
gremmie@1 1 {% extends 'bio/base.html' %}
bgneal@310 2 {% load url from future %}
gremmie@1 3 {% load avatar_tags %}
bgneal@29 4 {% load elsewhere_tags %}
gremmie@1 5 {% block title %}Edit Profile{% endblock %}
gremmie@1 6 {% block custom_js %}
gremmie@1 7 {{ profile_form.media }}
gremmie@1 8 {% endblock %}
gremmie@1 9 {% block content %}
gremmie@1 10 <div class="user_profile">
gremmie@1 11 <h2>Edit Profile for {{ user.username }}</h2>
bgneal@310 12 <form action="{% url 'bio-edit_profile' %}" method="post">{% csrf_token %}
gremmie@1 13 <table>
gremmie@1 14 <tr>
gremmie@1 15 <td>
bgneal@312 16 <a href="{% url 'bio-change_avatar' %}"><img src="{{ STATIC_URL }}icons/image_edit.png" alt="Change Avatar" /></a>
bgneal@310 17 <a href="{% url 'bio-change_avatar' %}">Change Avatar</a></td>
gremmie@1 18 <td>{% avatar user %}</td>
gremmie@1 19 </tr>
gremmie@1 20 {{ user_form.as_table }}
gremmie@1 21 {{ profile_form.as_table }}
bgneal@29 22 <tr>
bgneal@29 23 <td>
bgneal@312 24 <a href="{% url 'bio-edit_elsewhere' %}"><img src="{{ STATIC_URL }}icons/link_edit.png" alt="Edit Links" /></a>
bgneal@310 25 <a href="{% url 'bio-edit_elsewhere' %}">Edit Elsewhere Links</a></td>
bgneal@29 26 <td>{% elsewhere_links user %}</td>
bgneal@29 27 </tr>
bgneal@70 28 <tr>
bgneal@70 29 <th>Time Zone:</th>
bgneal@70 30 <td><select id="id_tz_area"></select> <select id="id_tz_location"></select></td>
gremmie@1 31 <tr><td>&nbsp;</td><td><input type="submit" name="submit_button" value="Save" />
gremmie@1 32 <input type="submit" name="submit_button" value="Cancel" /></td></tr>
gremmie@1 33 </table>
gremmie@1 34 </form>
gremmie@1 35 </div>
gremmie@1 36 <br />
gremmie@1 37 {% endblock %}