Skip to content

Commit

Permalink
views, templates: Add cast page.
Browse files Browse the repository at this point in the history
  • Loading branch information
MostAwesomeDude committed Jun 26, 2011
1 parent 36152fa commit 82cb239
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
1 change: 0 additions & 1 deletion TODO
@@ -1,4 +1,3 @@
* Cast page
* Blog
* Comments
* Threads for blog & comments
Expand Down
8 changes: 8 additions & 0 deletions newrem/templates/cast.html
@@ -0,0 +1,8 @@
{% extends "base.html" %}
{% block body %}
<ul>
{% for character in characters %}
<li>{{ character.name }}</li>
{% endfor %}
</ul>
{% endblock %}
8 changes: 6 additions & 2 deletions newrem/views.py
Expand Up @@ -7,8 +7,7 @@
from werkzeug import secure_filename
from werkzeug.security import Authenticator

from flask import (abort, flash, redirect, render_template, request, url_for,
Response)
from flask import abort, flash, redirect, render_template, request, url_for
from flaskext.login import login_user, logout_user

from newrem.forms import (CharacterCreateForm, CharacterDeleteForm,
Expand Down Expand Up @@ -141,6 +140,11 @@ def not_found(error):
def index():
return "One second, please."

@app.route("/cast")
def cast():
characters = Character.query.order_by(Character.name)
return render_template("cast.html", characters=characters)

@app.route("/comics/")
def comics_root():
return redirect(url_for("comics", cid=1))
Expand Down

0 comments on commit 82cb239

Please sign in to comment.