<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>templates/photos/comment_list.html</filename>
    </added>
    <added>
      <filename>views/comments.py</filename>
    </added>
    <added>
      <filename>views/gallery.py</filename>
    </added>
    <added>
      <filename>views/photo.py</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -3,7 +3,7 @@
 	All rights reserved.
 	
 	This software is provided without warranty under the terms of the BSD
-	license included in photos/LICENSE.txt and may be redistributed only under
+	license included in photos/LICENSE.markdown and may be redistributed only under
 	the conditions described in the aforementioned license. This license is also
 	available online at http://code.google.com/p/django-photo-gallery/wiki/License
 	</diff>
      <filename>admin.py</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
 	All rights reserved.
 	
 	This software is provided without warranty under the terms of the BSD
-	license included in photos/LICENSE.txt and may be redistributed only under
+	license included in photos/LICENSE.markdown and may be redistributed only under
 	the conditions described in the aforementioned license. This license is also
 	available online at http://code.google.com/p/django-photo-gallery/wiki/License
 	</diff>
      <filename>feeds.py</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
 	All rights reserved.
 	
 	This software is provided without warranty under the terms of the BSD
-	license included in photos/LICENSE.txt and may be redistributed only under
+	license included in photos/LICENSE.markdown and may be redistributed only under
 	the conditions described in the aforementioned license. This license is also
 	available online at http://code.google.com/p/django-photo-gallery/wiki/License
 	</diff>
      <filename>managers.py</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
 	All rights reserved.
 	
 	This software is provided without warranty under the terms of the BSD
-	license included in photos/LICENSE.txt and may be redistributed only under
+	license included in photos/LICENSE.markdown and may be redistributed only under
 	the conditions described in the aforementioned license. This license is also
 	available online at http://code.google.com/p/django-photo-gallery/wiki/License
 	</diff>
      <filename>models.py</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,7 @@
 	created by other entities. By downloading and/or using the template package,
 	you automatically accept the license and these terms and conditions.
 	
-	A copy of this license is included in photos/LICENSE.txt and available online
+	A copy of this license is included in photos/LICENSE.markdown and available online
 	at http://code.google.com/p/django-photo-gallery/wiki/License.
 #}
 </diff>
      <filename>templates/photos/base_photos.html</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,7 @@
 	created by other entities. By downloading and/or using the template package,
 	you automatically accept the license and these terms and conditions.
 	
-	A copy of this license is included in photos/LICENSE.txt and available online
+	A copy of this license is included in photos/LICENSE.markdown and available online
 	at http://code.google.com/p/django-photo-gallery/wiki/License.
 #}
 </diff>
      <filename>templates/photos/gallery_archive.html</filename>
    </modified>
    <modified>
      <diff>@@ -18,6 +18,6 @@
 	created by other entities. By downloading and/or using the template package,
 	you automatically accept the license and these terms and conditions.
 	
-	A copy of this license is included in photos/LICENSE.txt and available online
+	A copy of this license is included in photos/LICENSE.markdown and available online
 	at http://code.google.com/p/django-photo-gallery/wiki/License.
 #}
\ No newline at end of file</diff>
      <filename>templates/photos/gallery_comments.html</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,7 @@
 	created by other entities. By downloading and/or using the template package,
 	you automatically accept the license and these terms and conditions.
 	
-	A copy of this license is included in photos/LICENSE.txt and available online
+	A copy of this license is included in photos/LICENSE.markdown and available online
 	at http://code.google.com/p/django-photo-gallery/wiki/License.
 #}
 </diff>
      <filename>templates/photos/gallery_detail.html</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,7 @@
 	created by other entities. By downloading and/or using the template package,
 	you automatically accept the license and these terms and conditions.
 	
-	A copy of this license is included in photos/LICENSE.txt and available online
+	A copy of this license is included in photos/LICENSE.markdown and available online
 	at http://code.google.com/p/django-photo-gallery/wiki/License.
 #}
 </diff>
      <filename>templates/photos/gallery_index.html</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,7 @@
 	created by other entities. By downloading and/or using the template package,
 	you automatically accept the license and these terms and conditions.
 	
-	A copy of this license is included in photos/LICENSE.txt and available online
+	A copy of this license is included in photos/LICENSE.markdown and available online
 	at http://code.google.com/p/django-photo-gallery/wiki/License.
 #}
 </diff>
      <filename>templates/photos/gallery_title.html</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,7 @@
 	created by other entities. By downloading and/or using the template package,
 	you automatically accept the license and these terms and conditions.
 	
-	A copy of this license is included in photos/LICENSE.txt and available online
+	A copy of this license is included in photos/LICENSE.markdown and available online
 	at http://code.google.com/p/django-photo-gallery/wiki/License.
 #}
 </diff>
      <filename>templates/photos/photo_detail.html</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
 	All rights reserved.
 	
 	This software is provided without warranty under the terms of the BSD
-	license included in photos/LICENSE.txt and may be redistributed only under
+	license included in photos/LICENSE.markdown and may be redistributed only under
 	the conditions described in the aforementioned license. This license is also
 	available online at http://code.google.com/p/django-photo-gallery/wiki/License
 	</diff>
      <filename>templatetags/__init__.py</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
 	All rights reserved.
 	
 	This software is provided without warranty under the terms of the BSD
-	license included in photos/LICENSE.txt and may be redistributed only under
+	license included in photos/LICENSE.markdown and may be redistributed only under
 	the conditions described in the aforementioned license. This license is also
 	available online at http://code.google.com/p/django-photo-gallery/wiki/License
 	</diff>
      <filename>templatetags/photos.py</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
 	All rights reserved.
 	
 	This software is provided without warranty under the terms of the BSD
-	license included in photos/LICENSE.txt and may be redistributed only under
+	license included in photos/LICENSE.markdown and may be redistributed only under
 	the conditions described in the aforementioned license. This license is also
 	available online at http://code.google.com/p/django-photo-gallery/wiki/License
 	
@@ -13,28 +13,28 @@
 from django.conf.urls.defaults import *
 
 urlpatterns = patterns('',
-	# url(r'^comments/$',
-	# 	view	= 'photos.views.gallery_comments',
-	# 	name	= 'photo_gallery_comment',
-	# ),
+	url(r'^comments/$',
+		view	= 'photos.views.comments.list',
+		name	= 'photo_gallery_comment',
+	),
 	url(r'^galleries/$',
-		view	= 'photos.views.gallery_archive',
+		view	= 'photos.views.gallery.archive',
 		name	= 'photo_gallery_archive',
 	),
 	url(r'^(?P&lt;gallery_slug&gt;[-\w]+)/gallery/(?P&lt;photo_slug&gt;[-\w]+)/$',
-		view	= 'photos.views.photo_detail',
+		view	= 'photos.views.photo.detail',
 		name	= 'photo_gallery_photo_detail',
 	),
 	url(r'^(?P&lt;gallery_slug&gt;[-\w]+)/gallery/$',
-		view	= 'photos.views.gallery_detail',
+		view	= 'photos.views.gallery.detail',
 		name	= 'photo_gallery_detail',
 	),
 	url(r'^(?P&lt;gallery_slug&gt;[-\w]+)/$',
-		view	= 'photos.views.gallery_title',
+		view	= 'photos.views.gallery.title',
 		name	= 'photo_gallery_title',
 	),
 	url(r'^$', 
-		view	= 'photos.views.gallery_index',
+		view	= 'photos.views.gallery.index',
 		name	= 'photo_gallery_index',
 	),
 )
\ No newline at end of file</diff>
      <filename>urls.py</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
 	All rights reserved.
 	
 	This software is provided without warranty under the terms of the BSD
-	license included in photos/LICENSE.txt and may be redistributed only under
+	license included in photos/LICENSE.markdown and may be redistributed only under
 	the conditions described in the aforementioned license. This license is also
 	available online at http://code.google.com/p/django-photo-gallery/wiki/License
 	
@@ -13,82 +13,8 @@
 from django.http import Http404
 from django.shortcuts import render_to_response, get_object_or_404
 from django.template import RequestContext
-from django.core.paginator import QuerySetPaginator, InvalidPage
 
-from photos.models import Gallery, Photo, Module
-
-def gallery_index(request):
-	galleries = Gallery.objects.all()[:6]
-	favorites = Photo.objects.filter(favorite=True)[:6]
-	galleries_count = Gallery.objects.all().count()
-	photos_count = Photo.objects.all().count()
-	favorites_count = Photo.objects.filter(favorite=True).count()
-	
-	return render(request=request, template_name='photos/gallery_index.html', payload={
-		'galleries'			: galleries,
-		'favorites'			: favorites,
-		'galleries_count'	: galleries_count,
-		'photos_count'		: photos_count,
-		'favorites_count'	: favorites_count,
-	})
-
-def gallery_title(request, gallery_slug, page=0):
-	gallery = get_object_or_404(Gallery, slug__iexact=gallery_slug)
-	
-	return render(request, 'photos/gallery_title.html', { 'gallery': gallery })
-
-def gallery_detail(request, gallery_slug, page=0):
-	gallery = get_object_or_404(Gallery, slug__iexact=gallery_slug)
-	photos = Photo.objects.filter(gallery=gallery)
-	
-	paginator = QuerySetPaginator(photos, 25, allow_empty_first_page=True)
-	if not page:
-		page = request.GET.get('page', 1)
-		try:
-			page_number = int(page)
-		except ValueError:
-			if page == 'last':
-				page_number = paginator.num_pages
-			else:
-				raise Http404
-		
-		try:
-			page_obj = paginator.page(page_number)
-		except InvalidPage:
-			raise Http404
-	
-	return render(request, 'photos/gallery_detail.html', {
-		'gallery':			gallery,
-		'photos':			photos,
-		'is_paginated':		page_obj.has_other_pages(),
-		'results_per_page':	paginator.per_page,
-		'has_next':			page_obj.has_next(),
-		'has_previous':		page_obj.has_previous(),
-		'page':				page_obj.number,
-		'next':				page_obj.next_page_number(),
-		'previous':			page_obj.previous_page_number(),
-		'first_on_page':	page_obj.start_index(),
-		'last_on_page':		page_obj.end_index(),
-		'pages':			paginator.num_pages,
-		'hits':				paginator.count,
-		'page_range':		paginator.page_range,
-	})
-
-def gallery_archive(request):
-	galleries = Gallery.objects.all()
-	
-	return render(request=request, template_name='photos/gallery_archive.html', payload={
-		'galleries':	galleries,
-	})
-
-def photo_detail(request, gallery_slug, photo_slug):
-	gallery = get_object_or_404(Gallery, slug__iexact=gallery_slug)
-	photo = get_object_or_404(Photo, slug__iexact=photo_slug)
-	
-	return render(request=request, template_name='photos/photo_detail.html', payload={
-		'gallery':	gallery,
-		'photo':	photo,
-	})
+from photos.models import Module
 
 def render(request, template_name, payload):
 	footer = Module.objects.get(module_type=1)</diff>
      <filename>views/__init__.py</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
 	All rights reserved.
 	
 	This software is provided without warranty under the terms of the BSD
-	license included in photos/LICENSE.txt and may be redistributed only under
+	license included in photos/LICENSE.markdown and may be redistributed only under
 	the conditions described in the aforementioned license. This license is also
 	available online at http://code.google.com/p/django-photo-gallery/wiki/License
 	</diff>
      <filename>views/feeds.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>313fd821062f704ef95080390bb7e65e4efcd066</id>
    </parent>
    <parent>
      <id>5401dce0670b1e73e61a2355fa36f6d13c2e8bbb</id>
    </parent>
  </parents>
  <author>
    <name>Myles Braithwaite</name>
    <email>me@mylesbraithwaite.com</email>
  </author>
  <url>http://github.com/myles/django-photo-gallery/commit/ec5d0c80d275cb8282e1ce627dd1e8508332e755</url>
  <id>ec5d0c80d275cb8282e1ce627dd1e8508332e755</id>
  <committed-date>2008-08-11T21:00:38-07:00</committed-date>
  <authored-date>2008-08-11T21:00:38-07:00</authored-date>
  <message>Merge commit 'trunk'</message>
  <tree>0bed9e5d57b395b8be76d53a504f01571d8d6056</tree>
  <committer>
    <name>Myles Braithwaite</name>
    <email>me@mylesbraithwaite.com</email>
  </committer>
</commit>
