Skip to content

Commit

Permalink
adding templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Hoyer committed Feb 23, 2009
1 parent 239427e commit 13be720
Show file tree
Hide file tree
Showing 5 changed files with 142 additions and 0 deletions.
15 changes: 15 additions & 0 deletions 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 %}
32 changes: 32 additions & 0 deletions 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>
37 changes: 37 additions & 0 deletions 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 %}
45 changes: 45 additions & 0 deletions 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 %}
13 changes: 13 additions & 0 deletions 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.