diff --git a/apps/addons/models.py b/apps/addons/models.py index ea588b4301..057739c62b 100644 --- a/apps/addons/models.py +++ b/apps/addons/models.py @@ -2,7 +2,6 @@ from django.conf import settings from django.db import models import amo -from .models import Category from translations.fields import TranslatedField, translations_with_fallback @@ -95,7 +94,7 @@ class Addon(amo.ModelBase): class AddonCategory(models.Model): addon = models.ForeignKey(Addon) - category = models.ForeignKey(Category) + category = models.ForeignKey('Category') feature = models.BooleanField(default=False) feature_locales = models.CharField(max_length=255, default='') diff --git a/apps/blocklist/__init__.py b/apps/blocklist/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/apps/blocklist/models.py b/apps/blocklist/models.py new file mode 100644 index 0000000000..ef2c471dd3 --- /dev/null +++ b/apps/blocklist/models.py @@ -0,0 +1,39 @@ +from django.db import models + +import amo + + +class BlocklistApp(amo.ModelBase): + blitem = models.ForeignKey('BlocklistItem') + guid = models.CharField(max_length=255, blank=True, db_index=True) + min = models.CharField(max_length=255, blank=True) + max = models.CharField(max_length=255, blank=True) + + class Meta(amo.ModelBase.Meta): + db_table = 'blapps' + + +class BlocklistItem(amo.ModelBase): + guid = models.CharField(max_length=255, blank=True) + min = models.CharField(max_length=255, blank=True) + max = models.CharField(max_length=255, blank=True) + os = models.CharField(max_length=255, blank=True) + severity = models.SmallIntegerField(null=True) + + class Meta(amo.ModelBase.Meta): + db_table = 'blitems' + + +class BlocklistPlugin(amo.ModelBase): + name = models.CharField(max_length=255, blank=True) + guid = models.CharField(max_length=255, blank=True) + min = models.CharField(max_length=255, blank=True) + max = models.CharField(max_length=255, blank=True) + os = models.CharField(max_length=255, blank=True) + xpcomabi = models.CharField(max_length=255, blank=True) + description = models.CharField(max_length=255, blank=True) + filename = models.CharField(max_length=255, blank=True) + severity = models.SmallIntegerField(null=True) + + class Meta(amo.ModelBase.Meta): + db_table = 'blplugins'