Merge remote branch 'jezdez/master'

This commit is contained in:
Brian Rosner 2010-03-16 08:43:51 -06:00
commit d60ac863e4
3 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,6 @@
include LICENSE.txt
include CONTRIBUTORS.txt
include avatar/media/avatar/img/default.jpg
recursive-include docs *
recursive-include avatar/templates/avatar *.html
recursive-include avatar/locale/*/LC_MESSAGES *.mo *.po

View file

@ -5,6 +5,7 @@ from django.db import models
from django.core.files.base import ContentFile
from django.utils.translation import ugettext as _
from django.utils.hashcompat import md5_constructor
from django.utils.encoding import smart_str
from django.contrib.auth.models import User
@ -46,7 +47,7 @@ def avatar_file_path(instance=None, filename=None, size=None, ext=None):
# File doesn't exist yet
if AVATAR_HASH_FILENAMES:
(root, ext) = os.path.splitext(filename)
filename = md5_constructor(filename).hexdigest()
filename = md5_constructor(smart_str(filename)).hexdigest()
filename = filename + ext
if size:
tmppath.extend(['resized', str(size)])

View file

@ -164,6 +164,7 @@ setup(
'avatar': [
'templates/avatar/*.html',
'locale/*/LC_MESSAGES/*',
'media/avatar/img/default.jpg'
],
},
include_package_data=True,