Fixing usernames and missing avatars in new follower emails.

This commit is contained in:
Samuel Clay 2012-06-28 13:01:31 -07:00
parent 9e3771c481
commit bc229afb14
2 changed files with 2 additions and 2 deletions

View file

@ -59,7 +59,7 @@ def index(request):
try:
if '.' in username:
username = username.split('.')[0]
user = User.objects.get(username=username)
user = User.objects.get(username__icontains=username)
except User.DoesNotExist:
return HttpResponseRedirect('http://%s%s' % (
Site.objects.get_current().domain.replace('www', 'dev'),

View file

@ -285,7 +285,7 @@ class MSocialProfile(mongo.Document):
if self.photo_url.startswith('//'):
self.photo_url = 'http:' + self.photo_url
return self.photo_url
domain = Site.objects.get_current().domain
domain = Site.objects.get_current().domain.replace('www', 'dev')
return 'http://' + domain + settings.MEDIA_URL + 'img/reader/default_profile_photo.png'
def to_json(self, compact=False, include_follows=False, common_follows_with_user=None):