From 44cdd17a88595e16a9fd43f55e9dac38a0047e6b Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Mon, 21 May 2012 22:26:37 +0200 Subject: Move templates Moved templates into the aggregator app's folder. --- aggregator/templates/aggregator/base.html | 36 +++++++++++++++ aggregator/templates/aggregator/post_content.html | 34 ++++++++++++++ aggregator/templates/aggregator/post_detail.html | 24 ++++++++++ aggregator/templates/aggregator/posts.html | 54 +++++++++++++++++++++++ settings.py | 1 - templates/aggregator/base.html | 36 --------------- templates/aggregator/post_content.html | 34 -------------- templates/aggregator/post_detail.html | 24 ---------- templates/aggregator/posts.html | 54 ----------------------- 9 files changed, 148 insertions(+), 149 deletions(-) create mode 100644 aggregator/templates/aggregator/base.html create mode 100644 aggregator/templates/aggregator/post_content.html create mode 100644 aggregator/templates/aggregator/post_detail.html create mode 100644 aggregator/templates/aggregator/posts.html delete mode 100644 templates/aggregator/base.html delete mode 100644 templates/aggregator/post_content.html delete mode 100644 templates/aggregator/post_detail.html delete mode 100644 templates/aggregator/posts.html diff --git a/aggregator/templates/aggregator/base.html b/aggregator/templates/aggregator/base.html new file mode 100644 index 0000000..8f752bd --- /dev/null +++ b/aggregator/templates/aggregator/base.html @@ -0,0 +1,36 @@ + + + + + + ryuslash + + + {% block head %}{% endblock %} + + + + + +
+
+

+ ryuslash +

+

+ Will this ever really be my website? + {% for category in categories %} + {{ category.name }} + {% endfor %} +

+
+
+ + {% block menu %}{% endblock %} + +
+ {% block content %}{% endblock %} +
+ + diff --git a/aggregator/templates/aggregator/post_content.html b/aggregator/templates/aggregator/post_content.html new file mode 100644 index 0000000..e47de93 --- /dev/null +++ b/aggregator/templates/aggregator/post_content.html @@ -0,0 +1,34 @@ +
+
+
+

+ + + + + {% if post.feed.uses_title %} + {{ post.title }} + {% else %} + {{ post.updated }} + {% endif %} + +

+

+ Via + {{ post.feed.name }} + (profile, + origin) +

+
+
+ +
+ {% autoescape off %} + {% if post.feed.br2nl %} + {{ post.body|linebreaks }} + {% else %} + {{ post.body }} + {% endif %} + {% endautoescape %} +
+
diff --git a/aggregator/templates/aggregator/post_detail.html b/aggregator/templates/aggregator/post_detail.html new file mode 100644 index 0000000..eb39f95 --- /dev/null +++ b/aggregator/templates/aggregator/post_detail.html @@ -0,0 +1,24 @@ +{% extends "aggregator/base.html" %} + +{% block content %} +{% include "aggregator/post_content.html" with post=object %} + +
+ {% with next=object.get_next_by_updated previous=object.get_previous_by_updated %} + {% if previous %} + + {% endif %} + + {% if next %} + + {% endif %} + {% endwith %} +
+ +
+{% endblock %} diff --git a/aggregator/templates/aggregator/posts.html b/aggregator/templates/aggregator/posts.html new file mode 100644 index 0000000..37edf12 --- /dev/null +++ b/aggregator/templates/aggregator/posts.html @@ -0,0 +1,54 @@ +{% extends "aggregator/base.html" %} + +{% block head %} + +{% endblock %} + +{% block menu %} +
+ {% for feed in feeds %} + + + {{ feed.name }} + + {% endfor %} +
+{% endblock %} + +{% block content %} +{% regroup list.object_list by updated.date as grouped_list %} +{% for group in grouped_list %} +
+

+ +

+
+ + {% for post in group.list %} + {% include "aggregator/post_content.html" %} + {% endfor %} +{% endfor %} + +
+ {% if list.has_previous %} + + {% endif %} + + {% if list.has_next %} + + {% endif %} + +
+ {{ list.number }} / {{ list.paginator.num_pages }} +
+
+{% endblock %} diff --git a/settings.py b/settings.py index 5773145..1b70f09 100644 --- a/settings.py +++ b/settings.py @@ -108,7 +108,6 @@ TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. - '%s/templates' % DEPLOY_PATH, ) INSTALLED_APPS = ('django.contrib.contenttypes', diff --git a/templates/aggregator/base.html b/templates/aggregator/base.html deleted file mode 100644 index 8f752bd..0000000 --- a/templates/aggregator/base.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - ryuslash - - - {% block head %}{% endblock %} - - - - - -
-
-

- ryuslash -

-

- Will this ever really be my website? - {% for category in categories %} - {{ category.name }} - {% endfor %} -

-
-
- - {% block menu %}{% endblock %} - -
- {% block content %}{% endblock %} -
- - diff --git a/templates/aggregator/post_content.html b/templates/aggregator/post_content.html deleted file mode 100644 index e47de93..0000000 --- a/templates/aggregator/post_content.html +++ /dev/null @@ -1,34 +0,0 @@ -
-
-
-

- - - - - {% if post.feed.uses_title %} - {{ post.title }} - {% else %} - {{ post.updated }} - {% endif %} - -

-

- Via - {{ post.feed.name }} - (profile, - origin) -

-
-
- -
- {% autoescape off %} - {% if post.feed.br2nl %} - {{ post.body|linebreaks }} - {% else %} - {{ post.body }} - {% endif %} - {% endautoescape %} -
-
diff --git a/templates/aggregator/post_detail.html b/templates/aggregator/post_detail.html deleted file mode 100644 index eb39f95..0000000 --- a/templates/aggregator/post_detail.html +++ /dev/null @@ -1,24 +0,0 @@ -{% extends "aggregator/base.html" %} - -{% block content %} -{% include "aggregator/post_content.html" with post=object %} - -
- {% with next=object.get_next_by_updated previous=object.get_previous_by_updated %} - {% if previous %} - - {% endif %} - - {% if next %} - - {% endif %} - {% endwith %} -
- -
-{% endblock %} diff --git a/templates/aggregator/posts.html b/templates/aggregator/posts.html deleted file mode 100644 index 37edf12..0000000 --- a/templates/aggregator/posts.html +++ /dev/null @@ -1,54 +0,0 @@ -{% extends "aggregator/base.html" %} - -{% block head %} - -{% endblock %} - -{% block menu %} -
- {% for feed in feeds %} - - - {{ feed.name }} - - {% endfor %} -
-{% endblock %} - -{% block content %} -{% regroup list.object_list by updated.date as grouped_list %} -{% for group in grouped_list %} -
-

- -

-
- - {% for post in group.list %} - {% include "aggregator/post_content.html" %} - {% endfor %} -{% endfor %} - -
- {% if list.has_previous %} - - {% endif %} - - {% if list.has_next %} - - {% endif %} - -
- {{ list.number }} / {{ list.paginator.num_pages }} -
-
-{% endblock %} -- cgit v1.2.3-54-g00ecf