Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

adding templates

  • Loading branch information...
commit 13be720951a590f2a9e0ca76935503e199766cb7 1 parent 239427e
authored February 23, 2009
15  movie/templates/detailed_movies.html
... ...
@@ -0,0 +1,15 @@
  1
+{% extends "main.html" %}
  2
+{% block title %}neuste Filme{% endblock %}
  3
+{% block content %}
  4
+	<div id="person-list">
  5
+		<ul>
  6
+			{% for movie in movies %}
  7
+				<li>
  8
+					<a href="{% url movie.views.get_movie id=movie.id%}">
  9
+						{{movie.title}}
  10
+					</a>
  11
+				</li>
  12
+			{% endfor %}
  13
+		</ul>
  14
+	</div>
  15
+{% endblock %}
32  movie/templates/main.html
... ...
@@ -0,0 +1,32 @@
  1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
  3
+	<head>
  4
+	    <title>{% block title %}{% endblock %}</title>
  5
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  6
+	</head>
  7
+
  8
+	<body id="html-body"class=" adminhtml-system-config-edit">
  9
+		<div id="wrapper">
  10
+			<div id="header">
  11
+				<div id="logo">
  12
+					<h1>Sandoval</h1>
  13
+				</div>
  14
+				<div id="menu">
  15
+					<ul>
  16
+						<li><a href="{% url movie.views.get_detailed_movies %}">Home</a></li>
  17
+						<li><a href="{% url movie.views.get_detailed_movies order_by="title" %}">Filme A-Z</a></li>
  18
+						<li><a href="{% url movie.views.get_persons order_by="surname" %}">Personen A-Z</a></li>
  19
+					</ul>
  20
+				</div>
  21
+			</div>
  22
+			<div id="content">
  23
+				{% block content %}{% endblock %}	
  24
+			</div>
  25
+			<div id="footer">
  26
+				{% for query in connection.queries %}
  27
+					--{{query.sql}}
  28
+				{% endfor %}
  29
+			</div>
  30
+		</div>
  31
+	</body>
  32
+</html>
37  movie/templates/movie.html
... ...
@@ -0,0 +1,37 @@
  1
+{% extends "main.html" %}
  2
+{% block title %}{{movie.title}}{% endblock %}
  3
+{% block content %}
  4
+    <div class="movie">
  5
+        <h2>{{movie.title}} ({{movie.year}})</h2>
  6
+
  7
+        {% if movie.plot %}
  8
+	        <div class="plot">
  9
+	            <h3>Handlung</h3>
  10
+	            <p>
  11
+	                {{movie.plot}}
  12
+	            </p>
  13
+	        </div>
  14
+        {% endif %}
  15
+        <div class="infos">
  16
+            <h3>Informationen</h3>
  17
+            <dl>
  18
+                <dt>Laufzeit:</dt><dd>{{movie.runtime}} min</dd>
  19
+                <dt>Regie:</dt><dd>
  20
+                    {% for person in movie.director_set.all %}
  21
+                        <a href="{% url movie.views.get_person id=person.director.id%}">{{person.director.forename}} {{person.director.surname}}</a>
  22
+                    {% endfor %}
  23
+                </dd>
  24
+            </dl>
  25
+        </div>
  26
+        <div class="cast">
  27
+            <h3>Besetzung</h3>
  28
+            <dl>
  29
+                {% for person in movie.cast_set.all %}
  30
+                    <dt>{{person.role}}</dt>
  31
+                    <dd><a href="{% url movie.views.get_person id=person.actor.slug%}">{{person.actor.forename}} {{person.actor.surname}}</a></dd>
  32
+                {% endfor %}
  33
+            </dl>
  34
+        </div>
  35
+    </div>
  36
+
  37
+{% endblock %}
45  movie/templates/person.html
... ...
@@ -0,0 +1,45 @@
  1
+{% extends "main.html" %}
  2
+{% block title %}{{person.forename}} {{person.surname}}{% endblock %}
  3
+{% block content %}
  4
+	<div class="person">
  5
+		<h2>{{person.forename}} {{person.surname}}</h2>
  6
+        <div class="infos">
  7
+            <h3>Informationen</h3>
  8
+            <dl>
  9
+        		{% if person.birthdate %}
  10
+	            	<dt>geboren</dt>
  11
+	            	<dd>
  12
+	            		{{person.birthdate}} 
  13
+	            		{% if person.birthplace %}
  14
+	            			{{person.birthplace}}
  15
+	            		{% endif %}
  16
+	            	</dd>
  17
+        		{% endif %}
  18
+        		{% if person.biography %}
  19
+	            	<dt>Biographie</dt>
  20
+	            	<dd>
  21
+	            		<p>{{person.biography}}</p>
  22
+	            	</dd>
  23
+        		{% endif %}
  24
+    		</dl>
  25
+		</div>
  26
+		</div>
  27
+		{% if person.is_director %}
  28
+			<h3>Filme (Regie)</h3>
  29
+	        <div>
  30
+	        	{% for movie in person.movie_set.all %}
  31
+	        		<a href="{% url movie.views.get_movie id=movie.id %}">{{ movie.title }}</a>
  32
+	    		{% endfor %}
  33
+			</div>
  34
+		{% else %}
  35
+			<h3>Filme</h3>
  36
+	        <div>
  37
+	        	<dl>
  38
+	        	{% for cast in person.cast_set.all %}
  39
+	        		<dt>{{cast.role}}<dt>
  40
+	        		<dd><a href="{% url movie.views.get_movie id=cast.movie.id %}">{{ cast.movie.title }}</a></dd>
  41
+	    		{% endfor %}
  42
+			</div>
  43
+		{% endif %}
  44
+	</div>
  45
+{% endblock %}
13  movie/templates/persons.html
... ...
@@ -0,0 +1,13 @@
  1
+{% extends "main.html" %}
  2
+{% block title %}neuste Filme{% endblock %}
  3
+{% block content %}
  4
+	<div id="person-list">
  5
+		<ul>
  6
+		{% for person in persons %}
  7
+			<li>
  8
+                <a href="{% url movie.views.get_person id=person.id%}">{{person.forename}} {{person.surname}}</a>
  9
+			</li>
  10
+		{% endfor %}
  11
+		</ul>
  12
+	</div>
  13
+{% endblock %}

0 notes on commit 13be720

Please sign in to comment.
Something went wrong with that request. Please try again.