diff gpp/core/functions.py @ 176:b7ac381996e8

Implement ticket #59; update RSS feeds for Django 1.2.
author Brian Neal <bgneal@gmail.com>
date Thu, 11 Mar 2010 02:34:07 +0000
parents c14cfd6be87a
children aef00df91165
line wrap: on
line diff
--- a/gpp/core/functions.py	Wed Mar 03 04:09:42 2010 +0000
+++ b/gpp/core/functions.py	Thu Mar 11 02:34:07 2010 +0000
@@ -1,4 +1,5 @@
 """This file houses various core utility functions for GPP"""
+import datetime
 
 import django.core.mail
 from django.contrib.sites.models import Site
@@ -49,3 +50,14 @@
         return full_name
     return user.username
 
+
+BASE_YEAR = 2010
+
+def copyright_str():
+    curr_year = datetime.datetime.now().year
+    if curr_year == BASE_YEAR:
+        year_range = str(BASE_YEAR)
+    else:
+        year_range = "%d - %d" % (BASE_YEAR, curr_year)
+
+    return 'Copyright (C) %s, SurfGuitar101.com' % year_range