<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>feeds.py</filename>
    </added>
    <added>
      <filename>sitemap.py</filename>
    </added>
    <added>
      <filename>templates/presentations/base_presentation.html</filename>
    </added>
    <added>
      <filename>templates/presentations/presentation_detail.html</filename>
    </added>
    <added>
      <filename>templates/presentations/presentation_list.html</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -0,0 +1,106 @@
+from django.db.models import permalink
+from django.db import models
+from django.utils.translation import ugettext_lazy as _
+from django.db.models import permalink
+from django.contrib.auth.models import User
+
+class Presentation(models.Model):
+	DEFAULT_VIEW_CHOICE = (
+		('slideshow', 'Slideshow'),
+		('outline', 'Outline')
+	)
+	CONTROL_VIS_CHOICE = (
+		('visible', 'Visible'),
+		('hidden', 'Hidden')
+	)
+	THEME_CHOICE = (
+		('blue', 'Blue'),
+		('default', 'Default'),
+		('dokuwiki', 'DokuWiki'),
+		('flower', 'Flower'),
+		('i18n', 'i18n'),
+		('pixel', 'Pixel'),
+		('yatil', 'Yatil'),
+		('myles', 'Myles')
+	)
+	
+	title				= models.CharField(_('title'), max_length=200)
+	slug				= models.CharField(_('slug'), max_length=100, prepopulate_from=('title',), unique=True)
+	author				= models.ForeignKey(User, blank=True, null=True)
+	presentation_date	= models.DateField(_('presentation date'))
+	company				= models.CharField(_('company'), blank=True, null=True, max_length=200)
+	company_url			= models.URLField(_('company_url'), blank=True, verify_exists=True)
+	default_view		= models.CharField(_('default view'), choices=DEFAULT_VIEW_CHOICE, default=&quot;slideshow&quot;, max_length=9)
+	control_vis			= models.CharField(_('controls visible'), choices=CONTROL_VIS_CHOICE, default=&quot;hidden&quot;, max_length=7)
+	theme				= models.CharField(_('theme'), choices=THEME_CHOICE, default='myles', max_length=8)
+	header				= models.TextField(_('header'), blank=True, null=True, help_text=&quot;Use raw HTML.&quot;)
+	footer				= models.TextField(_('footer'), blank=True, null=True, help_text=&quot;Use raw HTML.&quot;)
+	topleft				= models.TextField(_('top left'), blank=True, null=True, help_text=&quot;Use raw HTML.&quot;)
+	topright			= models.TextField(_('top right'), blank=True, null=True, help_text=&quot;Use raw HTML.&quot;)
+	bottomleft			= models.TextField(_('bottom left'), blank=True, null=True, help_text=&quot;Use raw HTML.&quot;)
+	bottomright			= models.TextField(_('bottom right'), blank=True, null=True, help_text=&quot;Use raw HTML.&quot;)
+	
+	class Meta:
+		verbose_name		= _('presentation')
+		verbose_name_plural	= _('presentations')
+		db_table			= 'presentations'
+		ordering			= ('-presentation_date',)
+	
+	class Admin:
+		list_display	= ('title', 'author', 'presentation_date',)
+		list_filter		= ('author',)
+		ordering		= ('-presentation_date',)
+		fields			= (
+			(None, {
+				'fields': (('title', 'slug'), ('author', 'presentation_date'), 'header', 'footer', ('company', 'company_url'), ('default_view', 'control_vis', 'theme'))
+			}),
+			('Optional', {
+				'classes': 'collapse',
+				'fields': ('topleft', 'topright', 'bottomleft', 'bottomright')
+			}),
+		)
+	
+	def __unicode__(self):
+		return u&quot;%s&quot; % self.title
+	
+	@permalink
+	def get_absolute_url(self):
+		return ('presentation_detail', None, {
+			'slug'	: self.slug,
+		})
+
+def get_next_slide_weight(presentation):
+	try:
+		last = Slide.objects.order_by('-id').filter(presentation=presentation)[0]
+	except IndexError:
+		return '1'
+	
+	return str(int(last.weight) + 1)
+
+class Slide(models.Model):
+	presentation		= models.ForeignKey(Presentation)
+	title				= models.CharField(_('title'), max_length=200)
+	content				= models.TextField(_('slide content'), help_text=&quot;Use Textile.&quot;)
+	handout				= models.TextField(_('slide handout'), help_text=&quot;Ues Textile.&quot;, blank=True, null=True)
+	weight				= models.IntegerField(_('weight'), editable=False)
+	
+	class Meta:
+		verbose_name		= _('slide')
+		verbose_name_plural	= _('slides')
+		db_table			= 'presentation_slides'
+		ordering			= ('presentation', 'weight')
+	
+	class Admin:
+		list_display	= ('title', 'presentation')
+		list_filter		= ('presentation',)
+		ordering		= ('presentation', 'weight')
+	
+	def save(self):
+		self.weight = get_next_slide_weight(self.presentation)
+		super(Slide, self).save()
+	
+	def __unicode__(self):
+		return u&quot;%s&quot; % self.title
+	
+	def get_absolute_url(self):
+		return self.presentation.get_absolute_url()</diff>
      <filename>models.py</filename>
    </modified>
    <modified>
      <diff>@@ -0,0 +1,12 @@
+from django.conf.urls.defaults import *
+
+urlpatterns = patterns('',
+	url(r'^(?P&lt;slug&gt;[-\w]+)/$',
+		view	= 'presentations.views.detail',
+		name	= 'presentation_detail',
+	),
+	url(r'^$',
+		view	= 'presentations.views.list',
+		name	= 'presentation_list',
+	),
+)
\ No newline at end of file</diff>
      <filename>urls.py</filename>
    </modified>
    <modified>
      <diff>@@ -0,0 +1,16 @@
+from django.shortcuts import render_to_response
+from django.template import RequestContext
+from django.http import Http404
+
+from presentations.models import *
+
+def list(request):
+	presentations = Presentation.objects.all()
+	
+	return render_to_response('presentations/presentation_list.html', { 'presentations': presentations }, context_instance=RequestContext(request))
+
+def detail(request, slug):
+	presentation = Presentation.objects.get(slug=slug)
+	slides = presentation.slide_set.all()
+	
+	return render_to_response('presentations/presentation_detail.html', { 'object': presentation, 'slides': slides }, context_instance=RequestContext(request))</diff>
      <filename>views.py</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>templates/presentations/base_presentations.html</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>3f661dde97ebf3a5f28ba04050c729d288a0b724</id>
    </parent>
  </parents>
  <author>
    <name>Myles Braithwaite</name>
    <email>me@mylesbraithwaite.com</email>
  </author>
  <url>http://github.com/myles/django-s5/commit/3ce849f883ec5eed0fa14c3498018632d6f16201</url>
  <id>3ce849f883ec5eed0fa14c3498018632d6f16201</id>
  <committed-date>2008-07-10T12:28:00-07:00</committed-date>
  <authored-date>2008-07-10T12:28:00-07:00</authored-date>
  <message>Did a lot of stuff.</message>
  <tree>c2330a0fa65608c7181a906e0516c887bedeb879</tree>
  <committer>
    <name>Myles Braithwaite</name>
    <email>me@mylesbraithwaite.com</email>
  </committer>
</commit>
