From d6655d4957b9e1654d1bfe262d093120def254ee Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Fri, 17 Feb 2012 09:39:46 -0800 Subject: Initial commmit. --- templates/base.html | 45 +++++++++++++++++++++++++++++++++++++++++ templates/news/news_detail.html | 41 +++++++++++++++++++++++++++++++++++++ templates/news/news_list.html | 23 +++++++++++++++++++++ templates/news/post.html | 8 ++++++++ 4 files changed, 117 insertions(+) create mode 100644 templates/base.html create mode 100644 templates/news/news_detail.html create mode 100644 templates/news/news_list.html create mode 100644 templates/news/post.html (limited to 'templates') diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..1e2580f --- /dev/null +++ b/templates/base.html @@ -0,0 +1,45 @@ + + + + {% block title %}Site de la famille{% endblock title %} + + + + + + + + +
+
+ + +
+{% block content %}{% endblock %} +
+
+
+ + diff --git a/templates/news/news_detail.html b/templates/news/news_detail.html new file mode 100644 index 0000000..f65b91e --- /dev/null +++ b/templates/news/news_detail.html @@ -0,0 +1,41 @@ +{% extends 'base.html' %} + +{% block content %} +{% with news.comment_set.all as comments %} +
+

Détails

+
+ +
+

{{news.title}}

+ +
+{{news.text}} +
+ +
+ +

Commentaires

+{% for comment in comments %} +

Posté par {{comment.author}} le {{comment.date}}

+
+{{comment.text}} +
+{% endfor %} + +

Ajouter un commentaire

+ +
+ + +

+
+ +
+{% endwith %} +{% endblock %} diff --git a/templates/news/news_list.html b/templates/news/news_list.html new file mode 100644 index 0000000..2119a68 --- /dev/null +++ b/templates/news/news_list.html @@ -0,0 +1,23 @@ +{% extends 'base.html' %} + +{% block content %} +
+ {% for news in news_list %} +
+

{{ news.title }}

+ +

Posté par {{ news.author.username }} le {{ news.date }}

+
+ +

{% with news.comment__count as comment_count %} + {{ comment_count }} commentaire{{comment_count|pluralize}} | + Ajouter un commentaire +

{% endwith %} + +
+ {{ news.text }} +
+ {% endfor %} +
+
+{% endblock %} diff --git a/templates/news/post.html b/templates/news/post.html new file mode 100644 index 0000000..56ad2e4 --- /dev/null +++ b/templates/news/post.html @@ -0,0 +1,8 @@ +{% extends 'base.html' %} + +{% block content %} + +{{ form.as_p }} + + +{% endblock %} -- cgit v1.3