<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>example_project/site_media/theme/theme.css</filename>
    </added>
    <added>
      <filename>example_project/site_media/ticker</filename>
    </added>
    <added>
      <filename>example_project/templates/ticker/base.html</filename>
    </added>
    <added>
      <filename>ticker/templates/ticker/archive.html</filename>
    </added>
    <added>
      <filename>ticker/templates/ticker/archive_for_tag.html</filename>
    </added>
    <added>
      <filename>ticker/templates/ticker/base.html</filename>
    </added>
    <added>
      <filename>ticker/templates/ticker/details.html</filename>
    </added>
    <added>
      <filename>ticker/templates/ticker/overview.html</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,63 +1,104 @@
-# Django settings for tickerproject project.
-
 import os
-PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
+
+PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
+PROJECT_NAME = os.path.split(PROJECT_ROOT)[-1]
+
+# ==============================================================================
+# debug settings
+# ==============================================================================
 
 DEBUG = True
 TEMPLATE_DEBUG = DEBUG
+INTERNAL_IPS = ()
+if DEBUG:
+    TEMPLATE_STRING_IF_INVALID = ''
 
-ADMINS = (
-    # ('Your Name', 'your_email@domain.com'),
-)
-
-MANAGERS = ADMINS
+# ==============================================================================
+# cache settings
+# ==============================================================================
 
-DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
-DATABASE_NAME = 'dev.db'             # Or path to database file if using sqlite3.
-DATABASE_USER = ''             # Not used with sqlite3.
-DATABASE_PASSWORD = ''         # Not used with sqlite3.
-DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
-DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
+CACHE_BACKEND = 'locmem://'
+CACHE_MIDDLEWARE_KEY_PREFIX = '%s_' % PROJECT_NAME
+CACHE_MIDDLEWARE_SECONDS = 600
 
-# Local time zone for this installation. Choices can be found here:
-# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
-# although not all choices may be available on all operating systems.
-# If running in a Windows environment this must be set to the same as your
-# system time zone.
-TIME_ZONE = 'America/Chicago'
+# ==============================================================================
+# email and error-notify settings
+# ==============================================================================
 
-# Language code for this installation. All choices can be found here:
-# http://www.i18nguy.com/unicode/language-identifiers.html
-LANGUAGE_CODE = 'en-us'
+ADMINS = (
+    # ('Your Name', 'your_email@example.com'),
+)
 
-SITE_ID = 1
+MANAGERS = ADMINS
 
-# If you set this to False, Django will make some optimizations so as not
-# to load the internationalization machinery.
+DEFAULT_FROM_EMAIL = 'from-mail@example.com'
+SERVER_EMAIL = 'error-notify@example.com'
+
+EMAIL_SUBJECT_PREFIX = '[%s] ' % PROJECT_NAME
+EMAIL_HOST = 'localhost'
+EMAIL_PORT = 25
+EMAIL_HOST_USER = ''
+EMAIL_HOST_PASSWORD = ''
+EMAIL_USE_TLS = False
+
+# ==============================================================================
+# auth settings
+# ==============================================================================
+
+LOGIN_URL = '/accounts/login/'
+LOGOUT_URL = '/accounts/logout/'
+LOGIN_REDIRECT_URL = '/'
+
+# ==============================================================================
+# database settings
+# ==============================================================================
+
+DATABASE_ENGINE = 'sqlite3'
+DATABASE_NAME = os.path.join(PROJECT_ROOT, 'dev.db')
+DATABASE_USER = ''
+DATABASE_PASSWORD = ''
+DATABASE_HOST = ''
+DATABASE_PORT = ''
+
+# ==============================================================================
+# i18n and url settings
+# ==============================================================================
+
+TIME_ZONE = 'Europe/Berlin'
+LANGUAGE_CODE = 'de'
+LANGUAGES = (('en', 'English'),
+             ('de', 'German'))
 USE_I18N = True
 
-# Absolute path to the directory that holds media.
-# Example: &quot;/home/media/media.lawrence.com/&quot;
-MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
+SITE_ID = 1
 
-# URL that handles the media served from MEDIA_ROOT. Make sure to use a
-# trailing slash if there is a path component (optional in other cases).
-# Examples: &quot;http://media.lawrence.com&quot;, &quot;http://example.com/media/&quot;
+MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'site_media')
 MEDIA_URL = '/media/'
+ADMIN_MEDIA_PREFIX = '/django_admin_media/'
 
-# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
-# trailing slash.
-# Examples: &quot;http://foo.com/media/&quot;, &quot;/media/&quot;.
-ADMIN_MEDIA_PREFIX = '/media/admin/'
+ROOT_URLCONF = '%s.urls' % PROJECT_NAME
 
-# Make this unique, and don't share it with anybody.
-SECRET_KEY = '$1$jfnh^j-b5gq_sqg98wemtikz@iw7$&amp;)xqio(d=%2e=&amp;wai0'
+# ==============================================================================
+# application and middleware settings
+# ==============================================================================
 
-# List of callables that know how to import templates from various sources.
-TEMPLATE_LOADERS = (
-    'django.template.loaders.filesystem.load_template_source',
-    'django.template.loaders.app_directories.load_template_source',
-#     'django.template.loaders.eggs.load_template_source',
+INSTALLED_APPS = (
+    'django.contrib.auth',
+    'django.contrib.contenttypes',
+    'django.contrib.sessions',
+    'django.contrib.sites',
+    'django.contrib.admin',
+    'django.contrib.comments',
+    'tagging',
+    'ticker',
+)
+
+MIDDLEWARE_CLASSES = (
+    'django.contrib.sessions.middleware.SessionMiddleware',
+    'django.contrib.auth.middleware.AuthenticationMiddleware',
+    'django.middleware.http.ConditionalGetMiddleware',
+#    'django.middleware.gzip.GZipMiddleware',
+    'django.middleware.common.CommonMiddleware',
 )
 
 TEMPLATE_CONTEXT_PROCESSORS = (
@@ -66,34 +107,49 @@ TEMPLATE_CONTEXT_PROCESSORS = (
     'django.core.context_processors.i18n',
     'django.core.context_processors.media',
     'django.core.context_processors.request',
-    'ticker.context_processors.popular_tags',
-)
-
-MIDDLEWARE_CLASSES = (
-    'django.middleware.common.CommonMiddleware',
-    'django.contrib.sessions.middleware.SessionMiddleware',
-    'django.contrib.auth.middleware.AuthenticationMiddleware',
-    'pagination.middleware.PaginationMiddleware',
 )
 
-ROOT_URLCONF = 'tickerproject.urls'
-
 TEMPLATE_DIRS = (
-    # Put strings here, like &quot;/home/html/django_templates&quot; or &quot;C:/www/django/templates&quot;.
-    # Always use forward slashes, even on Windows.
-    # Don't forget to use absolute paths, not relative paths.
-    os.path.join(PROJECT_PATH, 'templates'),
+    os.path.join(PROJECT_ROOT, 'templates'),
 )
 
-INSTALLED_APPS = (
-    'django.contrib.auth',
-    'django.contrib.contenttypes',
-    'django.contrib.sessions',
-    'django.contrib.sites',
-    'django.contrib.admin',
-    'django_extensions',
-    'tagging',
-    'threadedcomments',
-    'pagination',
-    'ticker',
+TEMPLATE_LOADERS = (
+    'django.template.loaders.filesystem.load_template_source',
+    'django.template.loaders.app_directories.load_template_source',
+#    'django.template.loaders.eggs.load_template_source',
 )
+
+# ==============================================================================
+# the secret key
+# ==============================================================================
+
+try:
+    SECRET_KEY
+except NameError:
+    SECRET_FILE = os.path.join(PROJECT_ROOT, 'secret.txt')
+    try:
+        SECRET_KEY = open(SECRET_FILE).read().strip()
+    except IOError:
+        try:
+            from random import choice
+            SECRET_KEY = ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&amp;*(-_=+)') for i in range(50)])
+            secret = file(SECRET_FILE, 'w')
+            secret.write(SECRET_KEY)
+            secret.close()
+        except IOError:
+            Exception('Please create a %s file with random characters to generate your secret key!' % SECRET_FILE)
+
+# ==============================================================================
+# third party
+# ==============================================================================
+
+# ..third party app settings here
+
+# ==============================================================================
+# host specific settings
+# ==============================================================================
+
+try:
+    from local_settings import *
+except ImportError:
+    pass
\ No newline at end of file</diff>
      <filename>example_project/settings.py</filename>
    </modified>
    <modified>
      <diff>@@ -1,17 +1,25 @@
 {% load i18n %}
-{% load humanize %}
 
 &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
     &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
 
 &lt;html&gt;
 &lt;head&gt;
-    &lt;title&gt;{% trans &quot;WEBSITE_TITLE&quot; %}&lt;/title&gt;
+    &lt;title&gt;{% block title %}The Putbus Times{% endblock %}&lt;/title&gt;
     &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all&quot; href=&quot;/media/theme/theme.css&quot;&gt;
+    {% block extrahead %}{% endblock %}
 &lt;/head&gt;
 &lt;body&gt;
-    {% block content %}
-        
-    {% endblock %}
+    &lt;h1&gt;The Putbus Times&lt;/h1&gt;
+
+    &lt;div id=&quot;outline&quot;&gt;
+        {% block content %}        
+        {% endblock %}
+    &lt;/div&gt;
+
+    &lt;div id=&quot;footer&quot;&gt;
+        &lt;a href=&quot;/admin/&quot;&gt;Admin&lt;/a&gt;
+    &lt;/div&gt;
+
 &lt;/body&gt;
 &lt;/html&gt;
\ No newline at end of file</diff>
      <filename>example_project/templates/base.html</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ admin.autodiscover()
 
 urlpatterns = patterns('',
     (r'^admin/(.*)', admin.site.root),
-    (r'', include('ticker.urls')),
+    (r'^comments/', include('django.contrib.comments.urls')),
 )
 
 if settings.DEBUG:
@@ -15,3 +15,9 @@ if settings.DEBUG:
             'document_root': settings.MEDIA_ROOT
         })
     )
+
+# Include the ticker urls at last, so they will fetch article-slugs
+# on root level
+urlpatterns += patterns('',
+    (r'', include('ticker.urls')),
+)
\ No newline at end of file</diff>
      <filename>example_project/urls.py</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,4 @@
 from django.template.defaultfilters import dictsortreversed
-
 from tagging.models import Tag
 from ticker.models import Entry
 </diff>
      <filename>ticker/context_processors.py</filename>
    </modified>
    <modified>
      <diff>@@ -9,12 +9,9 @@ from django_extensions.db.fields import AutoSlugField
 from django_extensions.db.models import TimeStampedModel
 
 class EntryManager(models.Manager):
-    def published(self):
+    def public(self):
         &quot;&quot;&quot;Returns published entries only&quot;&quot;&quot;
         return self.filter(status=Entry.STATUS_OPEN)
-    def public(self):
-        &quot;&quot;&quot;This is for backwards compatibility, use .published() instead&quot;&quot;&quot;
-        return self.published()
     
 class Entry(TimeStampedModel):
 </diff>
      <filename>ticker/models.py</filename>
    </modified>
    <modified>
      <diff>@@ -14,8 +14,8 @@ urlpatterns = patterns('',
     # Archive site
     url(r'^archive/$', archive, name='ticker_archive'),
     
-    # Archive for tags
-    url(r'^archive/(?P&lt;tag&gt;[\w\s_\-\.% ]+)/$', archive_by_tag, name='ticker_archive_details'),
+    # Archive for a specific tag
+    url(r'^archive/(?P&lt;tag&gt;[\w\s_\-\.% ]+)/$', archive_by_tag, name='ticker_archive_for_tag'),
 
     # Detail page
     url(r'^(?P&lt;slug&gt;[-\w]+)/$', details, name='ticker_details'),</diff>
      <filename>ticker/urls.py</filename>
    </modified>
    <modified>
      <diff>@@ -1,50 +1,51 @@
-# -*- coding: utf-8 -*-
-
 from django.shortcuts import render_to_response, get_object_or_404
 from django.template.context import RequestContext
-
 from ticker.models import Entry
-from ticker.forms import BetterFreeThreadedCommentForm
 from tagging.models import Tag, TaggedItem
 
-def overview(request, page=None, per_page=10, template_name='ticker/overview.html'):
-    entry_list = Entry.objects.public()
-
-    return render_to_response(template_name, {
+def overview(request, num_latest=10, template_name='ticker/overview.html', extra_context={}):
+    &quot;&quot;&quot;Show the 10 latest entries&quot;&quot;&quot;
+    entry_list = Entry.objects.public()[:num_latest]
+    template_context = {
         'entry_list': entry_list,
-        'per_page': per_page,
-    }, RequestContext(request))
-
-def archive(request, template_name='ticker/archive.html'):
+    }
+    template_context.update(extra_context)
+    return render_to_response(template_name, template_context,
+                              RequestContext(request))
 
+def archive(request, template_name='ticker/archive.html', extra_context={}):
+    &quot;&quot;&quot;Shows a archive page and a list of tags&quot;&quot;&quot;
     entry_list = Entry.objects.public()
-    tag_list = Tag.objects.cloud_for_model(Entry, steps=9, filters={
-        'status': Entry.STATUS_OPEN
-    })
-    return render_to_response(template_name, {
+    tag_list = Tag.objects.cloud_for_model(Entry, steps=9, 
+                                           filters={'status': Entry.STATUS_OPEN })
+    template_context = {
         'entry_list': entry_list,
         'tag_list': tag_list,
-    }, RequestContext(request))
+    }
+    template_context.update(extra_context)
+    return render_to_response(template_name, template_context, 
+                              RequestContext(request))
 
-def archive_by_tag(request, tag, template_name='ticker/archive_by_tag.html'):
-
-    # Pr&#252;fe ob der Tag auch existiert
+def archive_by_tag(request, tag, template_name='ticker/archive_for_tag.html', extra_context={}):
+    &quot;&quot;&quot;Shows a list of entries related with a specific `tag`&quot;&quot;&quot;
     get_object_or_404(Tag, name=tag)
-
     entry_list = TaggedItem.objects.get_by_model(Entry.objects.public(), [tag])
     related_tags = Tag.objects.related_for_model([tag], Entry)
-
-    return render_to_response(template_name, {
+    template_context = {
         'the_tag': tag,
         'related_tags': related_tags,
         'entry_list': entry_list,
-    }, context_instance=RequestContext(request))
-
+    }
+    template_context.update(extra_context)
+    return render_to_response(template_name, template_context, 
+                              context_instance=RequestContext(request))
 
-def details(request, slug, template_name='ticker/details.html'):
+def details(request, slug, template_name='ticker/details.html', extra_context={}):
+    &quot;&quot;&quot;Shows a details page for the given entry&quot;&quot;&quot;
     entry = get_object_or_404(Entry.objects.public(), slug=slug)
-    return render_to_response(template_name, {
+    template_context = {
         'entry': entry,
-        'is_detail': True,
-        'comment_form': BetterFreeThreadedCommentForm(),
-    }, RequestContext(request))
+    }
+    template_context.update(extra_context)    
+    return render_to_response(template_name, template_context, 
+                              RequestContext(request))</diff>
      <filename>ticker/views.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ff7a8cb101bfdb8870139699bf59213e7f2f9e51</id>
    </parent>
  </parents>
  <author>
    <name>Martin Mahner</name>
    <email>martin@mahner.org</email>
  </author>
  <url>http://github.com/jezdez/django-ticker/commit/dca21256455a4878c30339a4b6e37daaaceec4fc</url>
  <id>dca21256455a4878c30339a4b6e37daaaceec4fc</id>
  <committed-date>2009-03-20T04:47:08-07:00</committed-date>
  <authored-date>2009-03-20T04:47:08-07:00</authored-date>
  <message>Created a new, good looking example site. </message>
  <tree>ee7dde2b580eb584d517dd9b3cd655f290842680</tree>
  <committer>
    <name>Martin Mahner</name>
    <email>martin@mahner.org</email>
  </committer>
</commit>
