Fixed migrations

This commit is contained in:
Fergal Moran
2015-08-12 23:12:43 +01:00
parent a8292b621c
commit 1b76a08170
6 changed files with 607 additions and 22 deletions

View File

@@ -0,0 +1,15 @@
from django.core.management.base import NoArgsCommand
from spa import models
class Command(NoArgsCommand):
def handle_noargs(self, **options):
try:
models.Notification.objects.all().delete()
act = models.Activity.objects.all().order_by('-id').select_subclasses()
for a in act:
print "Creating for: {0}".format(a)
a.create_notification(accept=True)
except Exception, ex:
print "Debug exception: %s" % ex.message