aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django
diff options
context:
space:
mode:
Diffstat (limited to 'bn_django')
-rw-r--r--bn_django/photos/templates/photos/gallery_detail.html4
-rw-r--r--bn_django/photos/templates/photos/gallery_list.html6
-rw-r--r--bn_django/photos/templates/photos/photo_detail.html2
-rw-r--r--bn_django/photos/urls.py2
4 files changed, 8 insertions, 6 deletions
diff --git a/bn_django/photos/templates/photos/gallery_detail.html b/bn_django/photos/templates/photos/gallery_detail.html
index ef08807..2de76d7 100644
--- a/bn_django/photos/templates/photos/gallery_detail.html
+++ b/bn_django/photos/templates/photos/gallery_detail.html
@@ -4,10 +4,10 @@
{{ block.super }}
{% if object %}
»
- <a href="../{{ object.id }}">{{ object.title }}</a>
+ <a href="../{{ object.slug }}/">{{ object.title }}</a>
{% endif %} {% endblock %}
{% block title %}
-{% if object %} Gallery: {{ object.title }} {% endif %}
+{% if object %}Photo Set: {{ object.title }} {% endif %}
{% endblock %}
{% block content %}
{% if object %} <br />
diff --git a/bn_django/photos/templates/photos/gallery_list.html b/bn_django/photos/templates/photos/gallery_list.html
index bb4e797..1757a22 100644
--- a/bn_django/photos/templates/photos/gallery_list.html
+++ b/bn_django/photos/templates/photos/gallery_list.html
@@ -1,7 +1,7 @@
{% extends "photos/base.html" %}
{# {% load markup %} #}
-{% block title %}Photo Galleries{% endblock %}
+{% block title %}Photo Sets{% endblock %}
{% block content %}
{% if object_list %}
@@ -9,7 +9,7 @@
{% for item in object_list %}
<tr>
<td class="photo_thumb">
- <a href="{{ item.id }}/">
+ <a href="{{ item.slug }}/">
{% if item.first %}
<img src="{{ item.first.thumburl }}"
alt="{{ item.first.title }}" />
@@ -18,7 +18,7 @@
{% endif %}
</a>
</td><td class="gallery_title">
- <h3><a href="{{ item.id }}/">{{ item.title }}</a></h3>
+ <h3><a href="{{ item.slug }}/">{{ item.title }}</a></h3>
<br />
{{ item.photo_set.count }} photo{{ item.photo_set.count|pluralize}}
{% if item.first.date %}
diff --git a/bn_django/photos/templates/photos/photo_detail.html b/bn_django/photos/templates/photos/photo_detail.html
index 3b582b1..ac1eb3b 100644
--- a/bn_django/photos/templates/photos/photo_detail.html
+++ b/bn_django/photos/templates/photos/photo_detail.html
@@ -5,7 +5,7 @@
{% block path %}
{{ block.super }}
&raquo;
- <a href="../../{{ object.gallery.id }}">{{ object.gallery.title }}</a>
+ <a href="../../{{ object.gallery.slug }}/">{{ object.gallery.title }}</a>
&raquo;
<a href="../{{ object.id }}">{{ object.title }}</a>
{% endblock %}
diff --git a/bn_django/photos/urls.py b/bn_django/photos/urls.py
index a413c3f..ffb7007 100644
--- a/bn_django/photos/urls.py
+++ b/bn_django/photos/urls.py
@@ -10,6 +10,8 @@ urlpatterns = patterns('django.views.generic.list_detail',
(r'^$', 'object_list',
dict(info_dict, queryset=Gallery.objects.all(),
paginate_by= 10, allow_empty= True)),
+ (r'^(?P<slug>[\d\w-]+)/$', 'object_detail',
+ dict(info_dict, queryset=Gallery.objects.all(), slug_field='slug')),
(r'^(?P<object_id>\d+)/$', 'object_detail',
dict(info_dict, queryset=Gallery.objects.all())),
(r'^detail/(?P<object_id>\d+)/$', 'object_detail',