Commits

Gerald Reinhart  committed b855ed6

add setup.py and a templatetag

  • Participants
  • Parent commits 87ac7d6

Comments (0)

Files changed (2)

File activity/templatetags/activity_templates.py

+
+
+import datetime
+from django.utils.translation import ugettext as _
+from django import template
+from models import  INSERT,UPDATE,DELETE
+
+
+register = template.Library()
+
+
+''' 
+   This function return a translated value of the  Log.action_flag
+'''
+def action_flag_value(value): # Only one argument.
+    if (value == INSERT): return _('log_insert')
+    if (value == UPDATE): return _('log_update')
+    if (value == DELETE): return _('log_delete')
+
+register.filter(action_flag_value)
+from distutils.core import setup
+
+setup(name='django-activity',
+      version='0.1',
+      description='A Django application to log activities (INSERT, UPDATE, DELETE)',
+      author='Gerald Reinhart',
+      url='http://bitbucket.org/greinhart/django-activity/',
+      packages=['activity'],
+    )
+
+