diff --git a/spa/management/commands/processuser.py b/spa/management/commands/processuser.py index 1ae74c7..02aa85a 100644 --- a/spa/management/commands/processuser.py +++ b/spa/management/commands/processuser.py @@ -16,6 +16,7 @@ class Command(NoArgsCommand): except ObjectDoesNotExist, ce: print "Creating profile for %s" % user.get_username() UserProfile.objects.create(user=user) - user.save() + finally: + user.save() except Exception, ex: - raise CommandError(ex.message) \ No newline at end of file + raise CommandError(ex.message) diff --git a/spa/models/UserProfile.py b/spa/models/UserProfile.py index 9c4b76e..d14a3c5 100644 --- a/spa/models/UserProfile.py +++ b/spa/models/UserProfile.py @@ -51,8 +51,9 @@ class UserProfile(_BaseModel): if not force_insert and not self.id: return - if self.slug == '': + if self.slug is None or self.slug == '': self.slug = unique_slugify(self, self.get_username()) + print "Slugified: %s" % self.slug return super(UserProfile, self).save(force_insert, force_update, using) diff --git a/spa/social/views.py b/spa/social/views.py index 46bdb63..b644164 100644 --- a/spa/social/views.py +++ b/spa/social/views.py @@ -43,7 +43,8 @@ def mix(request, args): mix_url = mix.get_absolute_url() default = _getPayload(request) extras = { - "description": mix.title, + "description": mix.description.replace('
', '\n'), + "title": mix.title, "image_url": image, "audio_url": 'http://%s%s' % (Site.objects.get_current().domain, audio_url), "mix_url": 'http://%s%s' % (Site.objects.get_current().domain, mix_url) diff --git a/templates/inc/facebook/mix.html b/templates/inc/facebook/mix.html index 08f50aa..081fa17 100644 --- a/templates/inc/facebook/mix.html +++ b/templates/inc/facebook/mix.html @@ -9,9 +9,10 @@ - + + - \ No newline at end of file +