Permalink
Browse files

adding templates

  • Loading branch information...
1 parent 239427e commit 13be720951a590f2a9e0ca76935503e199766cb7 Stephan Hoyer committed Feb 23, 2009
View
15 movie/templates/detailed_movies.html
@@ -0,0 +1,15 @@
+{% extends "main.html" %}
+{% block title %}neuste Filme{% endblock %}
+{% block content %}
+ <div id="person-list">
+ <ul>
+ {% for movie in movies %}
+ <li>
+ <a href="{% url movie.views.get_movie id=movie.id%}">
+ {{movie.title}}
+ </a>
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+{% endblock %}
View
32 movie/templates/main.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
+ <head>
+ <title>{% block title %}{% endblock %}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ </head>
+
+ <body id="html-body"class=" adminhtml-system-config-edit">
+ <div id="wrapper">
+ <div id="header">
+ <div id="logo">
+ <h1>Sandoval</h1>
+ </div>
+ <div id="menu">
+ <ul>
+ <li><a href="{% url movie.views.get_detailed_movies %}">Home</a></li>
+ <li><a href="{% url movie.views.get_detailed_movies order_by="title" %}">Filme A-Z</a></li>
+ <li><a href="{% url movie.views.get_persons order_by="surname" %}">Personen A-Z</a></li>
+ </ul>
+ </div>
+ </div>
+ <div id="content">
+ {% block content %}{% endblock %}
+ </div>
+ <div id="footer">
+ {% for query in connection.queries %}
+ --{{query.sql}}
+ {% endfor %}
+ </div>
+ </div>
+ </body>
+</html>
View
37 movie/templates/movie.html
@@ -0,0 +1,37 @@
+{% extends "main.html" %}
+{% block title %}{{movie.title}}{% endblock %}
+{% block content %}
+ <div class="movie">
+ <h2>{{movie.title}} ({{movie.year}})</h2>
+
+ {% if movie.plot %}
+ <div class="plot">
+ <h3>Handlung</h3>
+ <p>
+ {{movie.plot}}
+ </p>
+ </div>
+ {% endif %}
+ <div class="infos">
+ <h3>Informationen</h3>
+ <dl>
+ <dt>Laufzeit:</dt><dd>{{movie.runtime}} min</dd>
+ <dt>Regie:</dt><dd>
+ {% for person in movie.director_set.all %}
+ <a href="{% url movie.views.get_person id=person.director.id%}">{{person.director.forename}} {{person.director.surname}}</a>
+ {% endfor %}
+ </dd>
+ </dl>
+ </div>
+ <div class="cast">
+ <h3>Besetzung</h3>
+ <dl>
+ {% for person in movie.cast_set.all %}
+ <dt>{{person.role}}</dt>
+ <dd><a href="{% url movie.views.get_person id=person.actor.slug%}">{{person.actor.forename}} {{person.actor.surname}}</a></dd>
+ {% endfor %}
+ </dl>
+ </div>
+ </div>
+
+{% endblock %}
View
45 movie/templates/person.html
@@ -0,0 +1,45 @@
+{% extends "main.html" %}
+{% block title %}{{person.forename}} {{person.surname}}{% endblock %}
+{% block content %}
+ <div class="person">
+ <h2>{{person.forename}} {{person.surname}}</h2>
+ <div class="infos">
+ <h3>Informationen</h3>
+ <dl>
+ {% if person.birthdate %}
+ <dt>geboren</dt>
+ <dd>
+ {{person.birthdate}}
+ {% if person.birthplace %}
+ {{person.birthplace}}
+ {% endif %}
+ </dd>
+ {% endif %}
+ {% if person.biography %}
+ <dt>Biographie</dt>
+ <dd>
+ <p>{{person.biography}}</p>
+ </dd>
+ {% endif %}
+ </dl>
+ </div>
+ </div>
+ {% if person.is_director %}
+ <h3>Filme (Regie)</h3>
+ <div>
+ {% for movie in person.movie_set.all %}
+ <a href="{% url movie.views.get_movie id=movie.id %}">{{ movie.title }}</a>
+ {% endfor %}
+ </div>
+ {% else %}
+ <h3>Filme</h3>
+ <div>
+ <dl>
+ {% for cast in person.cast_set.all %}
+ <dt>{{cast.role}}<dt>
+ <dd><a href="{% url movie.views.get_movie id=cast.movie.id %}">{{ cast.movie.title }}</a></dd>
+ {% endfor %}
+ </div>
+ {% endif %}
+ </div>
+{% endblock %}
View
13 movie/templates/persons.html
@@ -0,0 +1,13 @@
+{% extends "main.html" %}
+{% block title %}neuste Filme{% endblock %}
+{% block content %}
+ <div id="person-list">
+ <ul>
+ {% for person in persons %}
+ <li>
+ <a href="{% url movie.views.get_person id=person.id%}">{{person.forename}} {{person.surname}}</a>
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+{% endblock %}

0 comments on commit 13be720

Please sign in to comment.