mirror of
https://github.com/fergalmoran/dss.git
synced 2026-02-08 17:13:58 +00:00
Altered process user to execute save on all
This commit is contained in:
@@ -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)
|
||||
raise CommandError(ex.message)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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('<br />', '\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)
|
||||
|
||||
@@ -9,9 +9,10 @@
|
||||
<meta property="og:type" content="deepsouthsounds:song" />
|
||||
<meta property="og:audio" content="{{ audio_url }}" />
|
||||
<meta property="og:audio:type" content="audio/vnd.facebook.bridge" />
|
||||
<meta property="og:title" content="{{ description }}" />
|
||||
<meta property="og:title" content="{{ title }}" />
|
||||
<meta property="og:description" content="{{ description }}" />
|
||||
<meta property="og:image" content="{{ image_url }}" />
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user