comparison 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
comparison
equal deleted inserted replaced
175:776028f4bced 176:b7ac381996e8
1 """This file houses various core utility functions for GPP""" 1 """This file houses various core utility functions for GPP"""
2 import datetime
2 3
3 import django.core.mail 4 import django.core.mail
4 from django.contrib.sites.models import Site 5 from django.contrib.sites.models import Site
5 from django.conf import settings 6 from django.conf import settings
6 7
47 full_name = user.get_full_name() 48 full_name = user.get_full_name()
48 if full_name: 49 if full_name:
49 return full_name 50 return full_name
50 return user.username 51 return user.username
51 52
53
54 BASE_YEAR = 2010
55
56 def copyright_str():
57 curr_year = datetime.datetime.now().year
58 if curr_year == BASE_YEAR:
59 year_range = str(BASE_YEAR)
60 else:
61 year_range = "%d - %d" % (BASE_YEAR, curr_year)
62
63 return 'Copyright (C) %s, SurfGuitar101.com' % year_range