David Chambers avatar David Chambers committed 75c1ed2

Replaced quirky "dhtml" and "dtext" extensions with "html" and "text".

Comments (0)

Files changed (62)

 
         if mango.settings.SUBSCRIPTIONS and thread_url: # notify subscribers
             subject = u'New comment on "%s"' % comment.thread.title
-            text_template = loader.get_template('email/subscriber.dtext')
-            html_template = loader.get_template('email/subscriber.dhtml')
+            text_template = loader.get_template('email/subscriber.text')
+            html_template = loader.get_template('email/subscriber.html')
 
             for sub in Subscription.objects.filter(url=thread_url):
                 ctx = Context({'comment': comment, 'subscription_id': sub.id})
 stripskips = partial(re.compile(r'</?skip>').sub, '')
 
 md = Markdown(extensions=('meta',) + mango.settings.MARKDOWN_EXTENSIONS)
-_renderupdate = loader.get_template('update.dhtml').render
+_renderupdate = loader.get_template('update.html').render
 
 def pairer(pattern):
     fn = re.compile(pattern, re.MULTILINE).split

management/commands/bake.py

 
             # HTML document
             f = codecs.open(os.path.join(dirpath, 'index.html'), 'w', 'utf-8')
-            f.write(render_to_string('%s.dhtml' % document.type,
+            f.write(render_to_string(document.type + '.html',
                                      {'document': document}))
             f.close()
 

template/video.py

 
 
 def videotemplate(fn):
-    template = loader.get_template('video/%s.dhtml' % fn.__name__)
+    template = loader.get_template('video/%s.html' % fn.__name__)
     return lambda *args, **kwargs: fn(template, *args, **kwargs)
 
 @urlmatch(r'^http://(?:player[.]vimeo[.]com/video|(?:www[.])?vimeo[.]com)/'

templates/404.dhtml

-{% extends "base.dhtml" %}
-
-{% block title %}404: Page not found{% endblock %}
-
-{% block content %}
-        <h1>404: Page not found</h1>
-        <p>Oops! The requested page appears not to exist.</p>
-{% endblock %}

templates/404.html

+{% extends "base.html" %}
+
+{% block title %}404: Page not found{% endblock %}
+
+{% block content %}
+        <h1>404: Page not found</h1>
+        <p>Oops! The requested page appears not to exist.</p>
+{% endblock %}

templates/500.html

-{% extends "base.dhtml" %}
+{% extends "base.html" %}
 
 {% block title %}500: Server error{% endblock %}
 

templates/_base.dhtml

-<!DOCTYPE html>
-{% load mango %}
-<html>
-  <head>
-{% block head %}
-    <meta charset="utf-8" />
-    <title>{% block title %}{{ SITE_TITLE }}{% endblock %}</title>
-
-  {% block feeds %}
-    <link rel="alternate" type="application/atom+xml" href="{% url mango.feeds.atom %}" />
-  {% endblock %}
-
-  {% for stylesheet in stylesheets %}
-    {{ stylesheet }}
-  {% endfor %}
-
-    <!--[if lt IE 9]>
-    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
-    <![endif]-->
-{% endblock %}
-  </head>
-
-  <body>
-{% block body %}
-    <div id="wrap">
-      <header id="header">
-  {% url mango.views.index as path %}
-  {% if request.path == path %}
-        <h1 id="title">{{ SITE_TITLE }}</h1>
-  {% else %}
-        <a id="title" href="{{ path }}">{{ SITE_TITLE }}</a>
-  {% endif %}
-
-  {% block navigation %}
-        <nav>
-          <ul>
-    {% block nav %}
-      {% if ARCHIVES %}{% url mango.views.archives as path %}
-            <li>{% if request.path == path %}Archives{% else %}<a href="{{ path }}">Archives</a>{% endif %}</li>
-      {% endif %}
-      {% if TAGS_PAGE %}{% url mango.views.tags as path %}
-            <li>{% if request.path == path %}Tags{% else %}<a href="{{ path }}">Tags</a>{% endif %}</li>
-      {% endif %}
-      {% if CONTACT_FORM %}{% url mango.views.contact as path %}
-            <li>{% if request.path == path %}Contact{% else %}<a href="{{ path }}">Contact</a>{% endif %}</li>
-      {% endif %}
-    {% endblock %}
-          </ul>
-        </nav>
-  {% endblock %}
-
-        <form action="{% url mango.views.search %}">
-          <div>
-            <label for="query">Search</label>
-            <input type="search" id="query" name="query"{% if terms %} value="{{ terms|to_query_string }}"{% endif %} />
-          </div>
-          <div>
-            <input type="submit" value="Search" />
-          </div>
-        </form>
-      </header>
-
-      <div id="main">
-  {% block content %}
-  {% endblock %}
-      </div>
-    </div>
-
-    <footer id="footer">
-  {% block footer %}
-      <p>Powered by <a href="http://mango.io/">Mango</a></p>
-  {% endblock %}
-    </footer>
-
-  {% block scripts %}
-    {% for script in scripts %}
-    {{ script }}
-    {% endfor %}
-    <script>
-      {% include "js/pilcrows.js" %}
-    </script>
-    {% if request|internal %}
-    <script>
-      {% include "js/flushcache.js" %}
-    </script>
-    {% endif %}
-  {% endblock %}
-
-  {% block analytics %}
-    {% if GOOGLE_ANALYTICS_ID and not settings.DEBUG %}
-    <script>
-      var _gaq = _gaq || [];
-      _gaq.push(['_setAccount', '{{ GOOGLE_ANALYTICS_ID }}']);
-      _gaq.push(['_trackPageview']);
-
-      (function () {
-        var ga = document.createElement('script');
-        ga.type = 'text/javascript';
-        ga.async = true;
-        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
-      }());
-    </script>
-    {% endif %}
-  {% endblock %}
-    <!-- Generated by Mango -->
-{% endblock %}
-  </body>
-</html>

templates/_base.html

+<!DOCTYPE html>
+{% load mango %}
+<html>
+  <head>
+{% block head %}
+    <meta charset="utf-8" />
+    <title>{% block title %}{{ SITE_TITLE }}{% endblock %}</title>
+
+  {% block feeds %}
+    <link rel="alternate" type="application/atom+xml" href="{% url mango.feeds.atom %}" />
+  {% endblock %}
+
+  {% for stylesheet in stylesheets %}
+    {{ stylesheet }}
+  {% endfor %}
+
+    <!--[if lt IE 9]>
+    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+{% endblock %}
+  </head>
+
+  <body>
+{% block body %}
+    <div id="wrap">
+      <header id="header">
+  {% url mango.views.index as path %}
+  {% if request.path == path %}
+        <h1 id="title">{{ SITE_TITLE }}</h1>
+  {% else %}
+        <a id="title" href="{{ path }}">{{ SITE_TITLE }}</a>
+  {% endif %}
+
+  {% block navigation %}
+        <nav>
+          <ul>
+    {% block nav %}
+      {% if ARCHIVES %}{% url mango.views.archives as path %}
+            <li>{% if request.path == path %}Archives{% else %}<a href="{{ path }}">Archives</a>{% endif %}</li>
+      {% endif %}
+      {% if TAGS_PAGE %}{% url mango.views.tags as path %}
+            <li>{% if request.path == path %}Tags{% else %}<a href="{{ path }}">Tags</a>{% endif %}</li>
+      {% endif %}
+      {% if CONTACT_FORM %}{% url mango.views.contact as path %}
+            <li>{% if request.path == path %}Contact{% else %}<a href="{{ path }}">Contact</a>{% endif %}</li>
+      {% endif %}
+    {% endblock %}
+          </ul>
+        </nav>
+  {% endblock %}
+
+        <form action="{% url mango.views.search %}">
+          <div>
+            <label for="query">Search</label>
+            <input type="search" id="query" name="query"{% if terms %} value="{{ terms|to_query_string }}"{% endif %} />
+          </div>
+          <div>
+            <input type="submit" value="Search" />
+          </div>
+        </form>
+      </header>
+
+      <div id="main">
+  {% block content %}
+  {% endblock %}
+      </div>
+    </div>
+
+    <footer id="footer">
+  {% block footer %}
+      <p>Powered by <a href="http://mango.io/">Mango</a></p>
+  {% endblock %}
+    </footer>
+
+  {% block scripts %}
+    {% for script in scripts %}
+    {{ script }}
+    {% endfor %}
+    <script>
+      {% include "js/pilcrows.js" %}
+    </script>
+    {% if request|internal %}
+    <script>
+      {% include "js/flushcache.js" %}
+    </script>
+    {% endif %}
+  {% endblock %}
+
+  {% block analytics %}
+    {% if GOOGLE_ANALYTICS_ID and not settings.DEBUG %}
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', '{{ GOOGLE_ANALYTICS_ID }}']);
+      _gaq.push(['_trackPageview']);
+
+      (function () {
+        var ga = document.createElement('script');
+        ga.type = 'text/javascript';
+        ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
+      }());
+    </script>
+    {% endif %}
+  {% endblock %}
+    <!-- Generated by Mango -->
+{% endblock %}
+  </body>
+</html>

templates/_contact.dhtml

-{% extends "base.dhtml" %}
-
-{% load mango %}
-
-{% block title %}Contact{% endblock %}
-
-{% block content %}
-      {% block contact_heading %}<h1>Contact</h1>{% endblock %}
-    {% if form %}
-      <form id="contact" method="post">{% csrf_token %}
-        <fieldset>
-          {% field form.sender_name %}
-          {% field form.sender_email %}
-          {% field form.subject %}
-        </fieldset>
-        {% field form.message %}
-        {% field form.cc_sender %}
-        <div><input type="submit" value="Send message" /></div>
-      </form>
-    {% else %}
-      <p>Thanks for your message. I'll do my best to respond in the not too distant future.</p>
-    {% endif %}
-{% endblock %}

templates/_contact.html

+{% extends "base.html" %}
+
+{% load mango %}
+
+{% block title %}Contact{% endblock %}
+
+{% block content %}
+      {% block contact_heading %}<h1>Contact</h1>{% endblock %}
+    {% if form %}
+      <form id="contact" method="post">{% csrf_token %}
+        <fieldset>
+          {% field form.sender_name %}
+          {% field form.sender_email %}
+          {% field form.subject %}
+        </fieldset>
+        {% field form.message %}
+        {% field form.cc_sender %}
+        <div><input type="submit" value="Send message" /></div>
+      </form>
+    {% else %}
+      <p>Thanks for your message. I'll do my best to respond in the not too distant future.</p>
+    {% endif %}
+{% endblock %}

templates/_document.dhtml

-{% extends "base.dhtml" %}
-
-{% load mango %}
-
-{% block title %}{{ document.title_text }}{% endblock %}
-
-{% block head %}
-    {{ block.super }}
-  {% for stylesheet in document.stylesheets %}
-    {{ stylesheet }}
-  {% endfor %}
-{% endblock %}
-
-{% block content %}
-        <article>
-          <header>
-            <h1>{{ document.title }}</h1>
-          {% if document.datetime %}
-            <time datetime="{{ document.datetime|isoformat }}" pubdate="pubdate">{{ document|pubdate }}</time>
-          {% endif %}
-          </header>
-          {{ document.html }}
-  {% block metadata %}
-        {% if document.author or document.tags or document.has_shorturl %}
-          <footer class="metadata">
-          {% if document.author or document.has_shorturl %}
-            <ul>
-            {% if document.author %}
-              <li class="author">
-              {% if document.author.url %}
-                <a href="{{ document.author.url }}">{{ document.author.name }}</a>
-              {% else %}
-                {{ document.author.name }}
-              {% endif %}
-              </li>
-            {% endif %}
-            {% if document.has_shorturl %}
-              <li class="shorturl"><a href="{{ document.shorturl }}">Short URL</a></li>
-            {% endif %}
-            </ul>
-          {% endif %}
-          {% if document.tags %}
-            <h4>This {{ document.type }} has the following tags:</h4>
-            <ol>
-            {% for tag in document.tags %}
-              <li><a href="{% url mango.views.tagged_as tag.slug %}">{{ tag }}</a></li>
-            {% endfor %}
-            </ol>
-          {% endif %}
-          </footer>
-        {% endif %}
-  {% endblock %}
-  {% block comments %}
-      {% if comments or new_comment %}
-          {% block comments_heading %}<h2 id="comments">Comments</h2>{% endblock %}
-          {% for comment in comments %}{% include "comment.dhtml" %}{% endfor %}
-        {% if new_comment %}
-          {{ new_comment }}
-          {% if COMMENTS_REQUIRE_APPROVAL %}
-          <p><strong>Your comment is awaiting moderation.</strong></p>
-          {% endif %}
-        {% endif %}
-      {% endif %}
-      {% if DISQUS and thread.allow_comments %}
-          {% block respond_heading %}<h3 id="respond">Respond</h3>{% endblock %}
-          {{ form.non_field_errors }}
-          <form id="comment" method="post">{% csrf_token %}
-            <fieldset>
-              {% field form.author_name %}
-              {% field form.author_email %}
-              {% field form.author_url %}
-            </fieldset>
-            {% field form.message %}
-          {% if SUBSCRIPTIONS %}
-            {% field form.subscribe %}
-          {% endif %}
-            <div><input type="submit" value="Submit comment" /></div>
-          </form>
-      {% endif %}
-  {% endblock %}
-        </article>
-{% endblock %}
-
-{% block scripts %}
-    {{ block.super }}
-  {% for script in document.scripts %}
-    {{ script }}
-  {% endfor %}
-{% endblock %}

templates/_document.html

+{% extends "base.html" %}
+
+{% load mango %}
+
+{% block title %}{{ document.title_text }}{% endblock %}
+
+{% block head %}
+    {{ block.super }}
+  {% for stylesheet in document.stylesheets %}
+    {{ stylesheet }}
+  {% endfor %}
+{% endblock %}
+
+{% block content %}
+        <article>
+          <header>
+            <h1>{{ document.title }}</h1>
+          {% if document.datetime %}
+            <time datetime="{{ document.datetime|isoformat }}" pubdate="pubdate">{{ document|pubdate }}</time>
+          {% endif %}
+          </header>
+          {{ document.html }}
+  {% block metadata %}
+        {% if document.author or document.tags or document.has_shorturl %}
+          <footer class="metadata">
+          {% if document.author or document.has_shorturl %}
+            <ul>
+            {% if document.author %}
+              <li class="author">
+              {% if document.author.url %}
+                <a href="{{ document.author.url }}">{{ document.author.name }}</a>
+              {% else %}
+                {{ document.author.name }}
+              {% endif %}
+              </li>
+            {% endif %}
+            {% if document.has_shorturl %}
+              <li class="shorturl"><a href="{{ document.shorturl }}">Short URL</a></li>
+            {% endif %}
+            </ul>
+          {% endif %}
+          {% if document.tags %}
+            <h4>This {{ document.type }} has the following tags:</h4>
+            <ol>
+            {% for tag in document.tags %}
+              <li><a href="{% url mango.views.tagged_as tag.slug %}">{{ tag }}</a></li>
+            {% endfor %}
+            </ol>
+          {% endif %}
+          </footer>
+        {% endif %}
+  {% endblock %}
+  {% block comments %}
+      {% if comments or new_comment %}
+          {% block comments_heading %}<h2 id="comments">Comments</h2>{% endblock %}
+          {% for comment in comments %}{% include "comment.html" %}{% endfor %}
+        {% if new_comment %}
+          {{ new_comment }}
+          {% if COMMENTS_REQUIRE_APPROVAL %}
+          <p><strong>Your comment is awaiting moderation.</strong></p>
+          {% endif %}
+        {% endif %}
+      {% endif %}
+      {% if DISQUS and thread.allow_comments %}
+          {% block respond_heading %}<h3 id="respond">Respond</h3>{% endblock %}
+          {{ form.non_field_errors }}
+          <form id="comment" method="post">{% csrf_token %}
+            <fieldset>
+              {% field form.author_name %}
+              {% field form.author_email %}
+              {% field form.author_url %}
+            </fieldset>
+            {% field form.message %}
+          {% if SUBSCRIPTIONS %}
+            {% field form.subscribe %}
+          {% endif %}
+            <div><input type="submit" value="Submit comment" /></div>
+          </form>
+      {% endif %}
+  {% endblock %}
+        </article>
+{% endblock %}
+
+{% block scripts %}
+    {{ block.super }}
+  {% for script in document.scripts %}
+    {{ script }}
+  {% endfor %}
+{% endblock %}

templates/archives.dhtml

-{% extends "base.dhtml" %}
-
-{% load mango %}
-
-{% block title %}Archives{% endblock %}
-
-{% block content %}
-        <h1>Archives</h1>
-      {% if archives %}
-        <ol id="archives">
-        {% for year, month, posts in archives %}
-          <li>
-            <h2>{{ month|month }} {{ year }}</h2>
-            <ol>
-            {% for post in posts %}
-              <li>
-                <a href="{{ post.permalink }}">{{ post.title }}</a>
-                <time datetime="{{ post.datetime|isoformat }}">{{ post|pubdate }}</time>
-              </li>
-            {% endfor %}
-            </ol>
-          </li>
-        {% endfor %}
-        </ol>
-      {% else %}
-        <p>The archives are currently empty.</p>
-      {% endif %}
-{% endblock %}

templates/archives.html

+{% extends "base.html" %}
+
+{% load mango %}
+
+{% block title %}Archives{% endblock %}
+
+{% block content %}
+        <h1>Archives</h1>
+      {% if archives %}
+        <ol id="archives">
+        {% for year, month, posts in archives %}
+          <li>
+            <h2>{{ month|month }} {{ year }}</h2>
+            <ol>
+            {% for post in posts %}
+              <li>
+                <a href="{{ post.permalink }}">{{ post.title }}</a>
+                <time datetime="{{ post.datetime|isoformat }}">{{ post|pubdate }}</time>
+              </li>
+            {% endfor %}
+            </ol>
+          </li>
+        {% endfor %}
+        </ol>
+      {% else %}
+        <p>The archives are currently empty.</p>
+      {% endif %}
+{% endblock %}

templates/base.dhtml

-{% extends "_base.dhtml" %}
-
-{% block scripts %}
-    {{ block.super }}
-    <script>
-      (function (undefined) {
-        var top, wrap = document.getElementById('wrap'), style = wrap.style;
-
-        if (style.webkitBorderImage === undefined &&
-            style.MozBorderImage === undefined &&
-            style.borderImage === undefined) {
-
-          if (wrap.className) {
-            wrap.className += ' noborderimage';
-          } else {
-            wrap.className = 'noborderimage';
-          }
-          top = document.createElement('div');
-          top.id = 'topfix';
-          wrap.appendChild(top);
-        }
-      }());
-    </script>
-{% endblock %}

templates/base.html

+{% extends "_base.html" %}
+
+{% block scripts %}
+    {{ block.super }}
+    <script>
+      (function (undefined) {
+        var top, wrap = document.getElementById('wrap'), style = wrap.style;
+
+        if (style.webkitBorderImage === undefined &&
+            style.MozBorderImage === undefined &&
+            style.borderImage === undefined) {
+
+          if (wrap.className) {
+            wrap.className += ' noborderimage';
+          } else {
+            wrap.className = 'noborderimage';
+          }
+          top = document.createElement('div');
+          top.id = 'topfix';
+          wrap.appendChild(top);
+        }
+      }());
+    </script>
+{% endblock %}

templates/category.dhtml

-{% extends "base.dhtml" %}
-
-{% load mango %}
-
-{% block title %}{{ category.name|smart_capfirst }}{% endblock %}
-
-{% block stylesheets %}
-    {{ block.super }}
-  {% for stylesheet in category.pages|combine:category.posts|required:"stylesheets" %}
-    {{ stylesheet }}
-  {% endfor %}
-{% endblock %}
-
-{% block content %}
-        <h1>{{ category.name|smart_capfirst }}</h1>
-      {% if category.html %}
-        {{ category.html }}
-      {% endif %}
-      {% if category.pages %}
-        <h2>Pages</h2>
-        {% for document in category.pages %}{% include "excerpt.dhtml" %}{% endfor %}
-      {% endif %}
-      {% if category.posts %}
-        <h2>Posts</h2>
-        {% for document in category.posts %}{% include "excerpt.dhtml" %}{% endfor %}
-      {% endif %}
-      {% if category.subcategories %}
-        <h2>Subcategor{{ category.subcategories|length|pluralize:"y,ies" }}</h2>
-        <ol id="subcategories">
-        {% for subcategory in category.subcategories %}
-          <li><a href="{{ subcategory.urls.canon.rel }}">{{ subcategory.name|smart_capfirst }}</a></li>
-        {% endfor %}
-        </ol>
-      {% endif %}
-      {% if not category.pages and not category.posts and not category.subcategories %}
-        <p>This category is currently empty.</p>
-      {% endif %}
-{% endblock %}
-
-{% block scripts %}
-    {{ block.super }}
-  {% for script in category.pages|combine:category.posts|required:"scripts" %}
-    {{ script }}
-  {% endfor %}
-{% endblock %}

templates/category.html

+{% extends "base.html" %}
+
+{% load mango %}
+
+{% block title %}{{ category.name|smart_capfirst }}{% endblock %}
+
+{% block stylesheets %}
+    {{ block.super }}
+  {% for stylesheet in category.pages|combine:category.posts|required:"stylesheets" %}
+    {{ stylesheet }}
+  {% endfor %}
+{% endblock %}
+
+{% block content %}
+        <h1>{{ category.name|smart_capfirst }}</h1>
+      {% if category.html %}
+        {{ category.html }}
+      {% endif %}
+      {% if category.pages %}
+        <h2>Pages</h2>
+        {% for document in category.pages %}{% include "excerpt.html" %}{% endfor %}
+      {% endif %}
+      {% if category.posts %}
+        <h2>Posts</h2>
+        {% for document in category.posts %}{% include "excerpt.html" %}{% endfor %}
+      {% endif %}
+      {% if category.subcategories %}
+        <h2>Subcategor{{ category.subcategories|length|pluralize:"y,ies" }}</h2>
+        <ol id="subcategories">
+        {% for subcategory in category.subcategories %}
+          <li><a href="{{ subcategory.urls.canon.rel }}">{{ subcategory.name|smart_capfirst }}</a></li>
+        {% endfor %}
+        </ol>
+      {% endif %}
+      {% if not category.pages and not category.posts and not category.subcategories %}
+        <p>This category is currently empty.</p>
+      {% endif %}
+{% endblock %}
+
+{% block scripts %}
+    {{ block.super }}
+  {% for script in category.pages|combine:category.posts|required:"scripts" %}
+    {{ script }}
+  {% endfor %}
+{% endblock %}

templates/comment.dhtml

-{% load mango %}
-
-          <article class="{% if comment|is_author_comment %}author {% endif %}comment" id="{{ comment.id }}">
-            <div>
-              {{ comment.html }}
-            </div>
-            <footer>
-              <img alt="" src="{{ comment|author_email_hash|gravatar }}" />
-            {% if comment|author_url %}
-              <strong><a href="{{ comment|author_url }}">{{ comment|author_name }}</a></strong>
-            {% else %}
-              <strong>{{ comment|author_name }}</strong>
-            {% endif %}
-              <time datetime="{{ comment.created_at|isoformat }}" pubdate="pubdate">
-                <span>{{ comment.created_at|display_date }}</span>
-                <span>{{ comment.created_at|display_time }}</span>
-              </time>
-            </footer>
-          </article>

templates/comment.html

+{% load mango %}
+
+          <article class="{% if comment|is_author_comment %}author {% endif %}comment" id="{{ comment.id }}">
+            <div>
+              {{ comment.html }}
+            </div>
+            <footer>
+              <img alt="" src="{{ comment|author_email_hash|gravatar }}" />
+            {% if comment|author_url %}
+              <strong><a href="{{ comment|author_url }}">{{ comment|author_name }}</a></strong>
+            {% else %}
+              <strong>{{ comment|author_name }}</strong>
+            {% endif %}
+              <time datetime="{{ comment.created_at|isoformat }}" pubdate="pubdate">
+                <span>{{ comment.created_at|display_date }}</span>
+                <span>{{ comment.created_at|display_time }}</span>
+              </time>
+            </footer>
+          </article>

templates/contact.dhtml

-{% extends "_contact.dhtml" %}

templates/contact.html

+{% extends "_contact.html" %}

templates/document.dhtml

-{% extends "_document.dhtml" %}

templates/document.html

+{% extends "_document.html" %}

templates/email/moderator.dhtml

-{% load mango %}
-<ul style="padding:0;list-style:none">
-<li><a style="text-decoration:none" href="{{ urls.post }}#respond">
-<img style="border:none;padding-right:5px" src="http://mango.io/static/e/respond.png" />
-Respond</a></li>
-<li><a style="text-decoration:none" href="{{ urls.approve }}">
-<img style="border:none;padding-right:5px" src="http://mango.io/static/e/approve.png" />
-Approve comment</a></li>
-<li><a style="text-decoration:none" href="{{ urls.delete }}">
-<img style="border:none;padding-right:5px" src="http://mango.io/static/e/delete.png" />
-Delete comment</a></li>
-<li><a style="text-decoration:none" href="{{ urls.spam }}">
-<img style="border:none;padding-right:5px" src="http://mango.io/static/e/spam.png" />
-Mark comment as spam</a></li>
-<li><a style="text-decoration:none" href="{{ urls.close }}">
-<img style="border:none;padding-right:5px" src="http://mango.io/static/e/close.png" />
-Close thread</a></li>
-</ul>
-<p>{{ commenter|convert_html_chars }} wrote:</p>
-<blockquote>{{ comment|convert }}</blockquote>

templates/email/moderator.dtext

-* Respond: {{ urls.post }}#respond
-* Approve comment: {{ urls.approve }}
-* Delete comment: {{ urls.delete }}
-* Mark comment as spam (and delete it): {{ urls.spam }}
-* Close thread: {{ urls.close }}
-
-{{ commenter|safe }} wrote:
-
-{{ comment|safe }}

templates/email/moderator.html

+{% load mango %}
+<ul style="padding:0;list-style:none">
+<li><a style="text-decoration:none" href="{{ urls.post }}#respond">
+<img style="border:none;padding-right:5px" src="http://mango.io/static/e/respond.png" />
+Respond</a></li>
+<li><a style="text-decoration:none" href="{{ urls.approve }}">
+<img style="border:none;padding-right:5px" src="http://mango.io/static/e/approve.png" />
+Approve comment</a></li>
+<li><a style="text-decoration:none" href="{{ urls.delete }}">
+<img style="border:none;padding-right:5px" src="http://mango.io/static/e/delete.png" />
+Delete comment</a></li>
+<li><a style="text-decoration:none" href="{{ urls.spam }}">
+<img style="border:none;padding-right:5px" src="http://mango.io/static/e/spam.png" />
+Mark comment as spam</a></li>
+<li><a style="text-decoration:none" href="{{ urls.close }}">
+<img style="border:none;padding-right:5px" src="http://mango.io/static/e/close.png" />
+Close thread</a></li>
+</ul>
+<p>{{ commenter|convert_html_chars }} wrote:</p>
+<blockquote>{{ comment|convert }}</blockquote>

templates/email/moderator.text

+* Respond: {{ urls.post }}#respond
+* Approve comment: {{ urls.approve }}
+* Delete comment: {{ urls.delete }}
+* Mark comment as spam (and delete it): {{ urls.spam }}
+* Close thread: {{ urls.close }}
+
+{{ commenter|safe }} wrote:
+
+{{ comment|safe }}

templates/email/subscriber.dhtml

-{% load mango %}
-<p><strong>{% filter force_escape %}{% firstof comment|author_name "An anonymous author" %}{% endfilter %}</strong> has commented on <a href="{{ comment.thread.url }}">{{ comment.thread.title }}</a>:</p>
-<blockquote>{{ comment.message|convert }}</blockquote>
-<p><a href="{{ comment.thread.url }}unsubscribe/{{ subscription_id }}/">Unsubscribe from this comment thread</a></p>

templates/email/subscriber.dtext

-{% load mango_extras %}{% firstof comment|author_name 'An anonymous author' %} has commented on "{{ comment.thread.title }}":
-
-{{ comment.message }}
-
-* View "{{ comment.thread.title }}": {{ comment.thread.url }}
-* Unsubscribe from this comment thread: {{ comment.thread.url }}unsubscribe/{{ subscription_id }}/

templates/email/subscriber.html

+{% load mango %}
+<p><strong>{% filter force_escape %}{% firstof comment|author_name "An anonymous author" %}{% endfilter %}</strong> has commented on <a href="{{ comment.thread.url }}">{{ comment.thread.title }}</a>:</p>
+<blockquote>{{ comment.message|convert }}</blockquote>
+<p><a href="{{ comment.thread.url }}unsubscribe/{{ subscription_id }}/">Unsubscribe from this comment thread</a></p>

templates/email/subscriber.text

+{% load mango_extras %}{% firstof comment|author_name 'An anonymous author' %} has commented on "{{ comment.thread.title }}":
+
+{{ comment.message }}
+
+* View "{{ comment.thread.title }}": {{ comment.thread.url }}
+* Unsubscribe from this comment thread: {{ comment.thread.url }}unsubscribe/{{ subscription_id }}/

templates/excerpt.dhtml

-{% load mango %}
-
-      <article>
-      {% if document.title or document.datetime %}
-        <header>
-        {% if document.title %}
-          <h2><a href="{{ document.permalink }}">{{ document.title }}</a></h2>
-        {% endif %}
-        {% if document.datetime %}
-          <time datetime="{{ document.datetime|isoformat }}" pubdate="pubdate">{{ document|pubdate }}</time>
-        {% endif %}
-        </header>
-      {% endif %}
-        {{ document.excerpt }}
-      </article>

templates/excerpt.html

+{% load mango %}
+
+      <article>
+      {% if document.title or document.datetime %}
+        <header>
+        {% if document.title %}
+          <h2><a href="{{ document.permalink }}">{{ document.title }}</a></h2>
+        {% endif %}
+        {% if document.datetime %}
+          <time datetime="{{ document.datetime|isoformat }}" pubdate="pubdate">{{ document|pubdate }}</time>
+        {% endif %}
+        </header>
+      {% endif %}
+        {{ document.excerpt }}
+      </article>

templates/formfield.dhtml

-<div class="{{ type }}">
-{% if errors %}
-  {{ errors }}
-{% endif %}
-  <label for="{{ id }}"{% if required %} class="required"{% endif %}>{{ label }}</label>
-  {% if textarea %}<textarea{% else %}<input type="{{ type }}"{% endif %} id="{{ id }}" name="{{ name }}"{% if maxlength %} maxlength="{{ maxlength }}"{% endif %}{% if placeholder %} placeholder="{{ placeholder }}"{% endif %}{% if textarea %}>{% if value %}{{ value }}{% endif %}</textarea>{% else %}{% if value %} value="{{ value }}"{% endif %} />{% endif %}
-</div>

templates/formfield.html

+<div class="{{ type }}">
+{% if errors %}
+  {{ errors }}
+{% endif %}
+  <label for="{{ id }}"{% if required %} class="required"{% endif %}>{{ label }}</label>
+  {% if textarea %}<textarea{% else %}<input type="{{ type }}"{% endif %} id="{{ id }}" name="{{ name }}"{% if maxlength %} maxlength="{{ maxlength }}"{% endif %}{% if placeholder %} placeholder="{{ placeholder }}"{% endif %}{% if textarea %}>{% if value %}{{ value }}{% endif %}</textarea>{% else %}{% if value %} value="{{ value }}"{% endif %} />{% endif %}
+</div>

templates/index.dhtml

-{% extends "base.dhtml" %}
-
-{% load mango %}
-
-{% block stylesheets %}
-    {{ block.super }}
-  {% for stylesheet in posts|slice:":5"|required:"stylesheets" %}
-    {{ stylesheet }}
-  {% endfor %}
-{% endblock %}
-
-{% block header_title %}<h1>{{ SITE_TITLE }}</h1>{% endblock %}
-
-{% block content %}
-    {% for document in posts|slice:":5" %}
-      {% include "excerpt.dhtml" %}
-    {% empty %}
-      <h2>Welcome to your new blog</h2>
-      <p>It's lookin' a bit empty, though. Get to work!</p>
-    {% endfor %}
-    {% if posts|length > 5 %}
-      <h2>Want more?</h2>
-      <p>Check out the <a href="{% url mango.views.archives %}">archives</a>.</p>
-    {% endif %}
-{% endblock %}
-
-{% block scripts %}
-    {{ block.super }}
-  {% for script in posts|slice:":5"|required:"scripts" %}
-    {{ script }}
-  {% endfor %}
-{% endblock %}

templates/index.html

+{% extends "base.html" %}
+
+{% load mango %}
+
+{% block stylesheets %}
+    {{ block.super }}
+  {% for stylesheet in posts|slice:":5"|required:"stylesheets" %}
+    {{ stylesheet }}
+  {% endfor %}
+{% endblock %}
+
+{% block header_title %}<h1>{{ SITE_TITLE }}</h1>{% endblock %}
+
+{% block content %}
+    {% for document in posts|slice:":5" %}
+      {% include "excerpt.html" %}
+    {% empty %}
+      <h2>Welcome to your new blog</h2>
+      <p>It's lookin' a bit empty, though. Get to work!</p>
+    {% endfor %}
+    {% if posts|length > 5 %}
+      <h2>Want more?</h2>
+      <p>Check out the <a href="{% url mango.views.archives %}">archives</a>.</p>
+    {% endif %}
+{% endblock %}
+
+{% block scripts %}
+    {{ block.super }}
+  {% for script in posts|slice:":5"|required:"scripts" %}
+    {{ script }}
+  {% endfor %}
+{% endblock %}

templates/page.dhtml

-{% extends "document.dhtml" %}

templates/page.html

+{% extends "document.html" %}

templates/paged.dhtml

-{% extends "base.dhtml" %}
-
-{% load mango %}
-
-{% block stylesheets %}
-    {{ block.super }}
-  {% for stylesheet in documents|required:"stylesheets" %}
-    {{ stylesheet }}
-  {% endfor %}
-{% endblock %}
-
-{% block content %}
-      {% for document in documents %}{% include "excerpt.dhtml" %}{% endfor %}
-    {% if prev_url or next_url %}
-      <ul id="page-navigation">
-      {% if prev_url %}
-        <li><a rel="prev" href="{{ prev_url }}">Newer entries</a></li>
-      {% endif %}
-      {% if next_url %}
-        <li><a rel="next" href="{{ next_url }}">Older entries</a></li>
-      {% endif %}
-      </ul>
-    {% endif %}
-{% endblock %}
-
-{% block scripts %}
-    {{ block.super }}
-  {% for script in documents|required:"scripts" %}
-    {{ script }}
-  {% endfor %}
-{% endblock %}

templates/paged.html

+{% extends "base.html" %}
+
+{% load mango %}
+
+{% block stylesheets %}
+    {{ block.super }}
+  {% for stylesheet in documents|required:"stylesheets" %}
+    {{ stylesheet }}
+  {% endfor %}
+{% endblock %}
+
+{% block content %}
+      {% for document in documents %}{% include "excerpt.html" %}{% endfor %}
+    {% if prev_url or next_url %}
+      <ul id="page-navigation">
+      {% if prev_url %}
+        <li><a rel="prev" href="{{ prev_url }}">Newer entries</a></li>
+      {% endif %}
+      {% if next_url %}
+        <li><a rel="next" href="{{ next_url }}">Older entries</a></li>
+      {% endif %}
+      </ul>
+    {% endif %}
+{% endblock %}
+
+{% block scripts %}
+    {{ block.super }}
+  {% for script in documents|required:"scripts" %}
+    {{ script }}
+  {% endfor %}
+{% endblock %}

templates/post.dhtml

-{% extends "document.dhtml" %}

templates/post.html

+{% extends "document.html" %}

templates/searchresults.dhtml

-{% extends "base.dhtml" %}
-
-{% load mango %}
-
-{% block title %}Search results{% if terms %} for {{ terms|to_query_string }}{% endif %}{% endblock %}
-
-{% block content %}
-      <h1>Search results{% if terms %} for <code>{{ terms|to_query_string }}</code>{% endif %}</h1>
-  {% if results.pages or results.posts %}
-    {% if results.pages %}
-      <h2>Pages</h2>
-      <ol class="searchresults">
-      {% for page in results.pages %}
-        <li><a href="{{ page.permalink }}">{{ page.title }}</a></li>
-      {% endfor %}
-      </ol>
-    {% endif %}
-    {% if results.posts %}
-      <h2>Posts</h2>
-      <ol class="searchresults">
-      {% for post in results.posts %}
-        <li><a href="{{ post.permalink }}">{{ post.title }}</a> (<time datetime="{{ post.datetime|isoformat }}">{{ post|pubdate }}</time>)</li>
-      {% endfor %}
-      </ol>
-    {% endif %}
-  {% else %}
-      <p>There are currently no documents that match your search term{{ terms|pluralize }}.</p>
-  {% endif %}
-{% endblock %}

templates/searchresults.html

+{% extends "base.html" %}
+
+{% load mango %}
+
+{% block title %}Search results{% if terms %} for {{ terms|to_query_string }}{% endif %}{% endblock %}
+
+{% block content %}
+      <h1>Search results{% if terms %} for <code>{{ terms|to_query_string }}</code>{% endif %}</h1>
+  {% if results.pages or results.posts %}
+    {% if results.pages %}
+      <h2>Pages</h2>
+      <ol class="searchresults">
+      {% for page in results.pages %}
+        <li><a href="{{ page.permalink }}">{{ page.title }}</a></li>
+      {% endfor %}
+      </ol>
+    {% endif %}
+    {% if results.posts %}
+      <h2>Posts</h2>
+      <ol class="searchresults">
+      {% for post in results.posts %}
+        <li><a href="{{ post.permalink }}">{{ post.title }}</a> (<time datetime="{{ post.datetime|isoformat }}">{{ post|pubdate }}</time>)</li>
+      {% endfor %}
+      </ol>
+    {% endif %}
+  {% else %}
+      <p>There are currently no documents that match your search term{{ terms|pluralize }}.</p>
+  {% endif %}
+{% endblock %}

templates/tag.dhtml

-{% extends "base.dhtml" %}
-
-{% load mango %}
-
-{% block title %}Posts tagged "{{ tag }}"{% endblock %}
-
-{% block feeds %}
-    {{ block.super }}
-    <link rel="alternate" type="application/atom+xml" href="{% url mango.feeds.atom tag %}" />
-{% endblock %}
-
-{% block stylesheets %}
-    {{ block.super }}
-  {% for stylesheet in documents|required:"stylesheets" %}
-    {{ stylesheet }}
-  {% endfor %}
-{% endblock %}
-
-{% block content %}
-      <h1>Posts tagged "{{ tag }}"</h1>
-    {% for document in documents %}
-      {% include "excerpt.dhtml" %}
-    {% empty %}
-      <p>There are currently no posts tagged "{{ tag }}".</p>
-    {% endfor %}
-{% endblock %}
-
-{% block scripts %}
-    {{ block.super }}
-  {% for script in documents|required:"scripts" %}
-    {{ script }}
-  {% endfor %}
-{% endblock %}

templates/tag.html

+{% extends "base.html" %}
+
+{% load mango %}
+
+{% block title %}Posts tagged "{{ tag }}"{% endblock %}
+
+{% block feeds %}
+    {{ block.super }}
+    <link rel="alternate" type="application/atom+xml" href="{% url mango.feeds.atom tag %}" />
+{% endblock %}
+
+{% block stylesheets %}
+    {{ block.super }}
+  {% for stylesheet in documents|required:"stylesheets" %}
+    {{ stylesheet }}
+  {% endfor %}
+{% endblock %}
+
+{% block content %}
+      <h1>Posts tagged "{{ tag }}"</h1>
+    {% for document in documents %}
+      {% include "excerpt.html" %}
+    {% empty %}
+      <p>There are currently no posts tagged "{{ tag }}".</p>
+    {% endfor %}
+{% endblock %}
+
+{% block scripts %}
+    {{ block.super }}
+  {% for script in documents|required:"scripts" %}
+    {{ script }}
+  {% endfor %}
+{% endblock %}

templates/tags.dhtml

-{% extends "base.dhtml" %}
-
-{% block title %}Tags{% endblock %}
-
-{% block content %}
-      <h1>Tags</h1>
-    {% if tags %}
-      <dl id="tags">
-      {% for tag, count in tags %}
-        <dt><a href="{% url mango.views.tagged_as tag.slug %}">{{ tag }}</a></dt>
-        <dd>{{ count }}</dd>
-      {% endfor %}
-      </dl>
-    {% else %}
-      <p>There are no tags to display.</p>
-    {% endif %}
-{% endblock %}

templates/tags.html

+{% extends "base.html" %}
+
+{% block title %}Tags{% endblock %}
+
+{% block content %}
+      <h1>Tags</h1>
+    {% if tags %}
+      <dl id="tags">
+      {% for tag, count in tags %}
+        <dt><a href="{% url mango.views.tagged_as tag.slug %}">{{ tag }}</a></dt>
+        <dd>{{ count }}</dd>
+      {% endfor %}
+      </dl>
+    {% else %}
+      <p>There are no tags to display.</p>
+    {% endif %}
+{% endblock %}

templates/update.dhtml

-{% load mango %}
-
-<div class="update">
-  <h{% firstof update.headinglevel 4 %}>Update{% if update.datetime %} — <time datetime="{{ update.datetime|isoformat }}">{{ update|pubdate }}</time>{% endif %}</h{% firstof update.headinglevel 4 %}>
-  {{ update.html }}
-</div>

templates/update.html

+{% load mango %}
+
+<div class="update">
+  <h{% firstof update.headinglevel 4 %}>Update{% if update.datetime %} — <time datetime="{{ update.datetime|isoformat }}">{{ update|pubdate }}</time>{% endif %}</h{% firstof update.headinglevel 4 %}>
+  {{ update.html }}
+</div>

templates/video/video.dhtml

-{% if tag == "dt" %}<dt>{% endif %}<iframe class="{% block class %}video{% endblock %}" type="text/html" src="{% block src %}{{ url }}{% endblock %}"{% if title %} title="{{ title }}"{% endif %}></iframe>{% if tag == "dt" %}</dt>{% endif %}

templates/video/video.html

+{% if tag == "dt" %}<dt>{% endif %}<iframe class="{% block class %}video{% endblock %}" type="text/html" src="{% block src %}{{ url }}{% endblock %}"{% if title %} title="{{ title }}"{% endif %}></iframe>{% if tag == "dt" %}</dt>{% endif %}

templates/video/vimeo.dhtml

-{% extends "video/video.dhtml" %}
-{% block class %}vimeo {{ block.super }}{% endblock %}

templates/video/vimeo.html

+{% extends "video/video.html" %}
+{% block class %}vimeo {{ block.super }}{% endblock %}

templates/video/youtube.dhtml

-{% extends "video/video.dhtml" %}
-{% block class %}youtube {{ block.super }}{% endblock %}
-{% block src %}{{ block.super }}?{% if "rel" not in query.keys %}rel=0{% if query %}&amp;{% endif %}{% endif %}{% for key, value in query.items %}{{ key }}={{ value }}{% if not forloop.last %}&amp;{% endif %}{% endfor %}{% endblock %}

templates/video/youtube.html

+{% extends "video/video.html" %}
+{% block class %}youtube {{ block.super }}{% endblock %}
+{% block src %}{{ block.super }}?{% if "rel" not in query.keys %}rel=0{% if query %}&amp;{% endif %}{% endif %}{% for key, value in query.items %}{{ key }}={{ value }}{% if not forloop.last %}&amp;{% endif %}{% endfor %}{% endblock %}

templatetags/mango_extras.py

     (forms.EmailField, 'email'),
     (forms.URLField, 'url'),
 )
-@register.inclusion_tag('formfield.dhtml')
+@register.inclusion_tag('formfield.html')
 def field(field):
     attrs = field.field
     if isinstance(attrs.widget, forms.widgets.Textarea):
 
     context['VERSION'] = mango.VERSION
 
-    ctx = RequestContext(request, context)
-    response = HttpResponse(loader.render_to_string(template_name,
-                                                    context_instance=ctx))
+    template = loader.select_template((template_name + '.html',
+                                       template_name + '.dhtml'))
+
+    response = HttpResponse(template.render(RequestContext(request, context)))
     if status_code is not None:
         response.status_code = status_code
 
 if mango.settings.SUBSCRIPTIONS:
     from mango.models import Subscription
 from mango.templatetags.mango import convert
-from mango.utils import (html_response, logger, primary_author_email, replace,
-        slugify, text_response)
+from mango.utils import (html_response, logger, primary_author_email,
+                         replace, slugify, text_response)
 
 def archives(request):
-    return html_response('archives.dhtml', request)
+    return html_response('archives', request)
 
 def category(request, category):
-    return html_response('category.dhtml', request, {'category': category})
+    return html_response('category', request, {'category': category})
 
 def contact(request):
     if request.method == 'POST':
     else:
         form = ContactForm()
 
-    return html_response('contact.dhtml', request, {'form': form})
+    return html_response('contact', request, {'form': form})
 
 def index(request):
     if mango.settings.PAGING:
         return page(request, number=1)
     else:
-        return html_response('index.dhtml', request)
+        return html_response('index', request)
 
 def message_sent(request):
-    return html_response('contact.dhtml', request)
+    return html_response('contact', request)
 
 def page(request, number, count=mango.settings.DISPLAY_COUNT):
     # canonicalize: /page/1/ -> /
     if offset + count < len(posts):
         next_url = reverse(page, args=(number + 1,))
 
-    return html_response('paged.dhtml', request, {'documents': documents,
+    return html_response('paged', request, {'documents': documents,
             'next_url': next_url, 'number': number, 'prev_url': prev_url,
             'total': (len(posts) + count - 1) / count})
 
 def page_not_found(request):
-    return html_response('404.dhtml', request, status_code=404)
+    return html_response('404', request, status_code=404)
 
 def post(request, path):
     path_ = path
 
     comment = request.session.pop('comment', None) if thread else None
     if comment is not None:
-        comment = render_to_string('comment.dhtml', {'comment': comment})
+        comment = render_to_string('comment.html', {'comment': comment})
 
     while True:  # avoids excessive indentation
         form = CommentForm()
             logger.error(error.message)
             return HttpResponseServerError(error.html())
 
-        msg = EmailMultiAlternatives(subject, render_to_string('email/moderator.dtext', context),
+        msg = EmailMultiAlternatives(subject, render_to_string('email/moderator.text', context),
                 to=[recipient], headers={'Reply-To': author})
-        msg.attach_alternative(render_to_string('email/moderator.dhtml', context), 'text/html')
+        msg.attach_alternative(render_to_string('email/moderator.html', context), 'text/html')
         msg.send(fail_silently=False)
 
         return HttpResponseRedirect(reverse('mango.handlers.redirect', args=(path_, comment.id)))
 
-    return html_response('%s.dhtml' % document.type, request, {
+    return html_response(document.type, request, {
         'comments': document.comments(),
         'document': document,
         'form': form,
             else:
                 posts.append(document)
 
-    return html_response('searchresults.dhtml', request,
+    return html_response('searchresults', request,
             {'results': {'pages': pages, 'posts': posts}, 'terms': terms})
 
 def tagged_as(request, tag):
     for document in Index.get().descendants(include_pages=True):
         if tag in [slugify(t) for t in document.meta.get('tags', [])]:
             documents.append(document)
-    return html_response('tag.dhtml', request, {'documents': documents, 'tag': tag})
+    return html_response('tag', request, {'documents': documents, 'tag': tag})
 
 def tags(request):
-    return html_response('tags.dhtml', request)
+    return html_response('tags', request)
 
 def view_source(request, path):
     path = u'%s%s/' % (reverse(index), path)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.