Example #1
0
    def setUp(self):
        install_triggers()

        self.testuser = User.objects.create_user("testuser","testuser","testuser")
        self.testuser.is_staff = True
        Permission.objects.get(name='Can change member').user_set.add(self.testuser)
        self.testuser.save()
Example #2
0
    def setUp(self):
        install_triggers()

        post = SkipPost(text='Here be ponies.')
        post.save()
        
        self.post = post
Example #3
0
    def setUp(self):
        denorms.drop_triggers()
        denorms.install_triggers()

        post = models.SkipPost(text='Here be ponies.')
        post.save()

        self.post = post
Example #4
0
    def setUp(self):
        denorms.drop_triggers()
        denorms.install_triggers()

        self.testuser = User.objects.create_user("testuser", "testuser", "testuser")
        self.testuser.is_staff = True
        ctype = ContentType.objects.get_for_model(models.Member)
        self.testuser.save()
Example #5
0
    def setUp(self):
        denorms.drop_triggers()
        denorms.install_triggers()

        post = models.SkipPost(text='Here be ponies.')
        post.save()

        self.post = post
Example #6
0
    def setUp(self):
        denorms.drop_triggers()
        denorms.install_triggers()

        self.testuser = User.objects.create_user("testuser", "testuser", "testuser")
        self.testuser.is_staff = True
        ctype = ContentType.objects.get_for_model(models.Member)
        self.testuser.save()
Example #7
0
    def setUp(self):
        install_triggers()

        self.testuser = User.objects.create_user("testuser","testuser","testuser")
        self.testuser.is_staff = True
        ctype = ContentType.objects.get_for_model(Member)
        Permission.objects.filter(content_type=ctype).get(name='Can change member').user_set.add(self.testuser)
        self.testuser.save()
Example #8
0
    def setUp(self):
        install_triggers()

        self.testuser = User.objects.create_user("testuser","testuser","testuser")
        self.testuser.is_staff = True
        ctype = ContentType.objects.get_for_model(Member)
        Permission.objects.filter(content_type=ctype).get(name='Can change member').user_set.add(self.testuser)
        self.testuser.save()
Example #9
0
    def setUp(self):
        denorms.drop_triggers()
        denorm.models.DirtyInstance.objects.all().delete()
        denorms.install_triggers()

        post = models.SkipPost(text='Here be ponies.')
        post.save()

        self.post = post
Example #10
0
    def setUp(self):
        denorms.drop_triggers()
        denorm.models.DirtyInstance.objects.all().delete()
        denorms.install_triggers()

        post = models.SkipPost(text='Here be ponies.')
        post.save()

        self.post = post
Example #11
0
 def test_triggers(self):
     """Test potentially failing denorms.
     """
     # save and restore alldenorms
     # test will fail if it's raising an exception
     alldenorms = denorms.alldenorms
     denorms.alldenorms = failingdenorms
     try:
         denorms.install_triggers()
     finally:
         denorms.alldenorms = alldenorms
Example #12
0
 def test_triggers(self):
     """Test potentially failing denorms.
     """
     # save and restore alldenorms
     # test will fail if it's raising an exception
     alldenorms = denorms.alldenorms
     denorms.alldenorms = failingdenorms
     try:
         denorms.install_triggers()
     finally:
         denorms.alldenorms = alldenorms
    def forwards(self, orm):
        
        # Adding field 'Course.description'
        db.add_column('courses_course', 'description', self.gf('django.db.models.TextField')(null=True, blank=True), keep_default=False)

        # Adding field 'Course.can_shorten'
        db.add_column('courses_course', 'can_shorten', self.gf('django.db.models.NullBooleanField')(null=True, blank=True), keep_default=False)
    
        # Adding field 'Course.path'
        db.add_column('courses_course', 'path', self.gf('django.contrib.gis.db.models.fields.GeometryField')(null=True, blank=True, srid=2193), keep_default=False)
    
        denorms.install_triggers()
    def backwards(self, orm):
        
        # Deleting field 'Course.description'
        db.delete_column('courses_course', 'description')

        # Deleting field 'Course.can_shorten'
        db.delete_column('courses_course', 'can_shorten')

        # Deleting field 'Course.path'
        db.delete_column('courses_course', 'path')
    
        denorms.install_triggers()
Example #15
0
 def handle(self, **kwargs):
     denorms.install_triggers()
Example #16
0
 def handle(self, **kwargs):
     denorms.install_triggers()
Example #17
0
 def setUp(self):
     denorms.drop_triggers()
     denorms.install_triggers()
Example #18
0
 def handle_noargs(self, **options):
     using = options['database']
     denorms.install_triggers(using=using)
Example #19
0
 def handle(self, **kwargs):
     from denorm import denorms
     using = kwargs.get('using')
     denorms.install_triggers(using=using)
Example #20
0
 def handle_noargs(self, **options):
     using = options["database"]
     denorms.install_triggers(using=using)
Example #21
0
 def setUp(self):
     denorms.drop_triggers()
     denorms.install_triggers()
 def handle(self, **options):
     using = options['database']
     denorms.install_triggers(using=using)