Commits

Ryan Wilcox committed 28c869a

added an overrides template folder, to put templates in in situations where we need to override default app behaviour

Comments (0)

Files changed (2)

project_dashboard/settings.py

     # For the pattern I adopt here.
     # 
     os.path.join(SITE_ROOT, 'templates'),
+    os.path.join(SITE_ROOT, 'templates', "overrides"),
     os.path.join(SITE_ROOT, "projects", "templates"),
     os.path.join(SITE_ROOT, 'templates', "project"),
 )

project_dashboard/templates/overrides/attachments/add_form.html

+<!-- Argh, django-attachments don't (yet) support csrf. The code copied from
+<http://github.com/jwmayfield/django-attachments/commit/eccd5e13059be9217b89fead59f36b1980ebd13b>,
+which at the time of this writing has not been applied to the package. WD-rpw 07-09-2010 -->
+
+{% load i18n %}
+{% if form %}
+<form method="post" enctype="multipart/form-data" action="{{ form_url }}" class="add-attachment">{% csrf_token %}
+    <input type="hidden" name="next" value="{{ next }}"/>
+    {{ form.as_p }}
+    <p class="submit">
+        <input type="submit" value="{% trans "Add attachment" %}"/>
+    </p>
+</form>
+{% endif %}