urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
- url(r'^quotes/', include('quotes.urls')),
+ url(r'^quotes/', include('quotes.urls', namespace='quotes')),
]
+++ /dev/null
-{% extends 'quotations/base.html' %}
-
-{% block body %}
-
-{% for quote in quotes %}
- {% include "quotations/display.html" with quote=quote %}
-{% endfor %}
-
-{% endblock %}
+++ /dev/null
-{% extends 'quotations/base.html' %}
-
-{% block body %}
-
-{% include "quotations/display.html" with quote=quote %}
-
-{% endblock %}
-{% extends 'quotations/base.html' %}
+{% extends 'quotes/base.html' %}
{% block body %}
<p>All the quotes for {{ author.name }}:<p>
{% for quote in author.quote_set.all %}
- {% include "quotations/display.html" with quote=quote %}
+ {% include "quotes/display.html" with quote=quote %}
{% endfor %}
<html>
<head>
{% load staticfiles %}
- <link rel="stylesheet" type="text/css" href="{% static 'quotations/style.css' %}" />
+ <link rel="stylesheet" type="text/css" href="{% static 'quotes/style.css' %}" />
</head>
<body>
{% block body %}
</p>
<p class="author">
- — <span class="name"><a href="{% url 'author' quote.author.id %}">
+ — <span class="name"><a href="{% url 'quotes:author' quote.author.id %}">
{{ quote.author.name }}
</a></span>
</p>
<p class="tags">
Tags:
{% for tag in quote.tags.all %}
- <a href="{% url 'tags' tag.id %}">{{ tag.tag }}</a>
+ <a href="{% url 'quotes:tags' tag.id %}">{{ tag.tag }}</a>
{% endfor %}
</p>
{% endif %}
--- /dev/null
+{% extends 'quotes/base.html' %}
+
+{% block body %}
+
+{% for quote in quotes %}
+ {% include "quotes/display.html" with quote=quote %}
+{% endfor %}
+
+{% endblock %}
--- /dev/null
+{% extends 'quotes/base.html' %}
+
+{% block body %}
+
+{% include "quotes/display.html" with quote=quote %}
+
+{% endblock %}
-{% extends 'quotations/base.html' %}
+{% extends 'quotes/base.html' %}
{% block body %}
<p>All the quotes tagged with {{ tag.tag }}:<p>
{% for quote in tag.quote_set.all %}
- {% include "quotations/display.html" with quote=quote %}
+ {% include "quotes/display.html" with quote=quote %}
{% endfor %}
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()
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)