From 979f7e231fdda726b78bb00914d4a5e22a1d81b7 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Perrin?=
Date: Wed, 28 Sep 2016 21:49:00 +0100
Subject: [PATCH] Rename code from 'quotations' to 'quotes'
---
djsite/urls.py | 2 +-
quotes/static/{quotations => quotes}/style.css | 0
quotes/templates/quotations/many.html | 9 ---------
quotes/templates/quotations/onequote.html | 7 -------
quotes/templates/{quotations => quotes}/author.html | 4 ++--
quotes/templates/{quotations => quotes}/base.html | 2 +-
quotes/templates/{quotations => quotes}/display.html | 4 ++--
quotes/templates/quotes/many.html | 9 +++++++++
quotes/templates/quotes/onequote.html | 7 +++++++
quotes/templates/{quotations => quotes}/tag.html | 4 ++--
quotes/views.py | 8 ++++----
11 files changed, 28 insertions(+), 28 deletions(-)
rename quotes/static/{quotations => quotes}/style.css (100%)
delete mode 100644 quotes/templates/quotations/many.html
delete mode 100644 quotes/templates/quotations/onequote.html
rename quotes/templates/{quotations => quotes}/author.html (62%)
rename quotes/templates/{quotations => quotes}/base.html (88%)
rename quotes/templates/{quotations => quotes}/display.html (65%)
create mode 100644 quotes/templates/quotes/many.html
create mode 100644 quotes/templates/quotes/onequote.html
rename quotes/templates/{quotations => quotes}/tag.html (62%)
diff --git a/djsite/urls.py b/djsite/urls.py
index b325b2a..761ea47 100644
--- a/djsite/urls.py
+++ b/djsite/urls.py
@@ -18,5 +18,5 @@ from django.contrib import admin
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
- url(r'^quotes/', include('quotes.urls')),
+ url(r'^quotes/', include('quotes.urls', namespace='quotes')),
]
diff --git a/quotes/static/quotations/style.css b/quotes/static/quotes/style.css
similarity index 100%
rename from quotes/static/quotations/style.css
rename to quotes/static/quotes/style.css
diff --git a/quotes/templates/quotations/many.html b/quotes/templates/quotations/many.html
deleted file mode 100644
index 63d4f03..0000000
--- a/quotes/templates/quotations/many.html
+++ /dev/null
@@ -1,9 +0,0 @@
-{% extends 'quotations/base.html' %}
-
-{% block body %}
-
-{% for quote in quotes %}
- {% include "quotations/display.html" with quote=quote %}
-{% endfor %}
-
-{% endblock %}
diff --git a/quotes/templates/quotations/onequote.html b/quotes/templates/quotations/onequote.html
deleted file mode 100644
index 0102dcc..0000000
--- a/quotes/templates/quotations/onequote.html
+++ /dev/null
@@ -1,7 +0,0 @@
-{% extends 'quotations/base.html' %}
-
-{% block body %}
-
-{% include "quotations/display.html" with quote=quote %}
-
-{% endblock %}
diff --git a/quotes/templates/quotations/author.html b/quotes/templates/quotes/author.html
similarity index 62%
rename from quotes/templates/quotations/author.html
rename to quotes/templates/quotes/author.html
index 38b36c7..1fa09c8 100644
--- a/quotes/templates/quotations/author.html
+++ b/quotes/templates/quotes/author.html
@@ -1,4 +1,4 @@
-{% extends 'quotations/base.html' %}
+{% extends 'quotes/base.html' %}
{% block body %}
@@ -8,7 +8,7 @@
All the quotes for {{ author.name }}:
{% for quote in author.quote_set.all %}
- {% include "quotations/display.html" with quote=quote %}
+ {% include "quotes/display.html" with quote=quote %}
{% endfor %}
diff --git a/quotes/templates/quotations/base.html b/quotes/templates/quotes/base.html
similarity index 88%
rename from quotes/templates/quotations/base.html
rename to quotes/templates/quotes/base.html
index b11766b..fe72a43 100644
--- a/quotes/templates/quotations/base.html
+++ b/quotes/templates/quotes/base.html
@@ -1,7 +1,7 @@
{% load staticfiles %}
-
+
{% block body %}
diff --git a/quotes/templates/quotations/display.html b/quotes/templates/quotes/display.html
similarity index 65%
rename from quotes/templates/quotations/display.html
rename to quotes/templates/quotes/display.html
index 62d36d9..108dc92 100644
--- a/quotes/templates/quotations/display.html
+++ b/quotes/templates/quotes/display.html
@@ -4,7 +4,7 @@
- â
+ â
{{ quote.author.name }}
@@ -13,7 +13,7 @@
Tags:
{% for tag in quote.tags.all %}
- {{ tag.tag }}
+ {{ tag.tag }}
{% endfor %}
{% endif %}
diff --git a/quotes/templates/quotes/many.html b/quotes/templates/quotes/many.html
new file mode 100644
index 0000000..328863b
--- /dev/null
+++ b/quotes/templates/quotes/many.html
@@ -0,0 +1,9 @@
+{% extends 'quotes/base.html' %}
+
+{% block body %}
+
+{% for quote in quotes %}
+ {% include "quotes/display.html" with quote=quote %}
+{% endfor %}
+
+{% endblock %}
diff --git a/quotes/templates/quotes/onequote.html b/quotes/templates/quotes/onequote.html
new file mode 100644
index 0000000..4d01894
--- /dev/null
+++ b/quotes/templates/quotes/onequote.html
@@ -0,0 +1,7 @@
+{% extends 'quotes/base.html' %}
+
+{% block body %}
+
+{% include "quotes/display.html" with quote=quote %}
+
+{% endblock %}
diff --git a/quotes/templates/quotations/tag.html b/quotes/templates/quotes/tag.html
similarity index 62%
rename from quotes/templates/quotations/tag.html
rename to quotes/templates/quotes/tag.html
index bf06aff..266cd16 100644
--- a/quotes/templates/quotations/tag.html
+++ b/quotes/templates/quotes/tag.html
@@ -1,4 +1,4 @@
-{% extends 'quotations/base.html' %}
+{% extends 'quotes/base.html' %}
{% block body %}
@@ -8,7 +8,7 @@
All the quotes tagged with {{ tag.tag }}:
{% for quote in tag.quote_set.all %}
- {% include "quotations/display.html" with quote=quote %}
+ {% include "quotes/display.html" with quote=quote %}
{% endfor %}
diff --git a/quotes/views.py b/quotes/views.py
index 6157192..981af05 100644
--- a/quotes/views.py
+++ b/quotes/views.py
@@ -10,7 +10,7 @@ from .models import Author, Quote, Tag
def onequote(request, quote_id):
q = Quote.objects.get(id=quote_id)
context = { 'quote' : q }
- return render(request, 'quotations/onequote.html', context)
+ return render(request, 'quotes/onequote.html', context)
def random(request):
count = Quote.objects.count()
@@ -19,14 +19,14 @@ def random(request):
def tags(request, tag_id):
tag = Tag.objects.get(id=tag_id)
context = { 'tag' : tag }
- return render(request, 'quotations/tag.html', context)
+ return render(request, 'quotes/tag.html', context)
def author(request, author_id):
author = Author.objects.get(id=author_id)
context = { 'author' : author }
- return render(request, 'quotations/author.html', context)
+ return render(request, 'quotes/author.html', context)
def all(request):
quotes = Quote.objects.all()
context = { 'quotes' : quotes }
- return render(request, 'quotations/all.html', context)
+ return render(request, 'quotes/all.html', context)
--
2.43.0