Permalink
Browse files

Removed more unused files. Updated LICENSE. Bumped up to version 0.2.…

…0. Added a README.
  • Loading branch information...
1 parent dca2125 commit edbf3162568c42a1314fdc98491474c80865f577 @bartTC bartTC committed Mar 20, 2009
Showing with 60 additions and 58 deletions.
  1. +1 −1 LICENSE
  2. +57 −0 README
  3. +2 −3 setup.py
  4. +0 −18 ticker/context_processors.py
  5. +0 −36 ticker/forms.py
View
@@ -1,4 +1,4 @@
-Copyright (c) 2008, Martin Mahner, 2009 Jannis Leidel
+Copyright (c) 2008-2009, Martin Mahner, 2009 Jannis Leidel
All rights reserved.
Redistribution and use in source and binary forms, with or without
View
@@ -2,3 +2,60 @@
django-ticker
=============
+django-ticker is a reusable Django_ application that provides a ticker like
+news section including row level permissions. What does this mean?
+
+In django-ticker you have a fine grained permission control what the
+(administrative) user can do and what not. Besides the default Django
+permissions -- add, change, delete -- there are some extra permissions:
+
+- change_foreign
+- publish
+
+Originally this was created for a news section for the `german Django community`_
+where foreign users could add articles but had no permission to publish
+them, cause a moderator must check these articles first.
+
+It's easy to create a pressroom like workflow, assumed we have different
+people with different permissions:
+
+The Freelance Journalist:
+ Granted permissions: add, change
+
+ - can add articles
+ - can change his articles (only his own)
+ - can not delete his articles
+ - can set the status of the article to "closed" or "draft". Draft means,
+ that the article is ready for check by a moderator.
+ - in the admin list of articles, he sees only his own
+
+The Journalist:
+ Granted permissions: add, change, delete, publish
+
+ - can add articles
+ - can change and delete his articles (only his own)
+ - can set the status of the article to "closed", "draft" or "published"
+ - in the admin list of articles, he sees only his own
+
+The Chief Editor (or moderator):
+ Granted permissions: add, change, delete, publish, change_foreign
+
+ - can add articles
+ - can change and delete all (!) articles
+ - can set the status of the article to "closed", "draft" or "published"
+ - in the admin list of articles, he sees all articles
+
+The corrector (or lector):
+ Granted permissions: change, change_foreign
+
+ - Can not add articles
+ - Can not delete articles
+ - Can not publish articles
+ - Can change all articles (e.g. for corrections)
+ - in the admin list of articles, he sees all articles
+
+So, you can mix these permissions and create a workflow that perfectly
+fits your needs.
+
+.. _`Django`: http://www.djangoproject.com/
+.. _`german Django Community`: http://django-de.org/
View
@@ -2,17 +2,16 @@
setup(
name='django-ticker',
- version='0.1.1',
+ version='0.2.0',
description='A simple Django app for newsticker with a row level permission based workflow.',
author='Martin Mahner',
author_email='martin@mahner.org',
maintainer='Jannis Leidel',
maintainer_email='jannis@leidel.info',
url='http://github.com/jezdez/django-ticker/tree/master',
- packages=find_packages(exclude=['tickerproject', 'tickerproject.*']),
+ packages=find_packages(exclude=['example_project', 'example_project.*']),
package_data = {
'ticker': [
- 'media/ticker/*/*',
'templates/ticker/*.html'
],
},
@@ -1,18 +0,0 @@
-from django.template.defaultfilters import dictsortreversed
-from tagging.models import Tag
-from ticker.models import Entry
-
-def popular_tags(request):
- poptags = Tag.objects.usage_for_model(Entry, counts=True, filters={
- 'status': Entry.STATUS_OPEN})
- poptags = dictsortreversed(poptags, 'count')
-
- if len(poptags) < 1:
- poptags_max = 0
- else:
- poptags_max = poptags[0].count
-
- return {
- 'popular_tags': poptags,
- 'popular_tags_max': poptags_max,
- }
View
@@ -1,36 +0,0 @@
-from django import forms
-from django.conf import settings
-from django.utils.translation import ugettext as _
-
-from threadedcomments.forms import FreeThreadedCommentForm
-
-class BetterFreeThreadedCommentForm(FreeThreadedCommentForm):
-
- def __init__(self, *args, **kwargs):
- super(BetterFreeThreadedCommentForm, self).__init__(*args, **kwargs)
-
- # Hide fields
- self.fields['markup'].widget = forms.HiddenInput()
- self.fields['email'].widget = forms.HiddenInput(attrs={'autocomplete': 'off'})
-
- def clean_email(self):
- """
- A HiddenInput as a honeypot.
- Returns a error message if a e-mail address was entered.
- """
- if self.cleaned_data.get('email', False):
- raise forms.ValidationError("We DON'T want to know your e-mail " \
- "address, please leave this field empty.")
- return self.cleaned_data.get('email')
-
- def clean_name(self):
- '''
- Simples Keyword-Blocking. Gesperrte Usernamen werden in einer Tupel in
- settings.THREADEDCOMMENTS_BLOCKED_USERNAMES definiert.
- '''
- this_name = self.cleaned_data.get('name')
- for blocked_name in getattr(settings, 'THREADEDCOMMENTS_BLOCKED_USERNAMES', ()):
- if blocked_name in this_name:
- raise forms.ValidationError(_('Your name contains a blocked '
- 'word: "%s" Please remove it from your name.' % blocked_name))
- return this_name

0 comments on commit edbf316

Please sign in to comment.