Added snippet database to the website.

This commit is contained in:
Armin Ronacher 2010-05-03 11:20:52 +02:00
parent a81cf3a67c
commit 0ab7a9cb67
22 changed files with 825 additions and 118 deletions

View file

@ -0,0 +1,19 @@
{% extends "snippets/layout.html" %}
{% block title %}{{ category.name }}{% endblock %}
{% block body %}
<h2>{{ category.name }}</h2>
{% if category.count > 3 %}
<p>
Here you can find all {{ category.count }} snippets of this
category. You can also
{% else %}
This category is pretty empty so far. Why not
{% endif %}
<a href="{{ url_for('snippets.new',
category=category.slug) }}">add a new one</a>.
<ul>
{% for snippet in snippets %}
<li><a href="{{ snippet.url }}">{{ snippet.title }}</a>
{% endfor %}
</ul>
{% endblock %}