Пример #1
0
class Article(models.Model):
    title = models.TextField(db_index=True)
    authors = models.TextField(blank=True)
    description = models.TextField(blank=True)
    text_field = models.TextField(null=True)
    link = models.URLField(max_length=510, unique=True, db_index=True)
    published = models.DateTimeField(null=True)
    created = models.DateTimeField(auto_now_add=True)
    updated = models.DateTimeField(null=True)
    tweet_count = models.IntegerField()
    raw = models.BinaryField(null=True)
    source_hash = models.BigIntegerField(null=True)
    missing_data = models.CharField(blank=True, max_length=255)
    positive_feedback = models.PositiveIntegerField(null=True,
                                                    blank=True,
                                                    default=0)
    negative_feedback = models.PositiveIntegerField(null=True,
                                                    blank=True,
                                                    default=0)
    popularity_index = models.IntegerField(default=0)

    objects = BungiesearchManager()

    class Meta:
        app_label = 'core'
Пример #2
0
class User(models.Model):
    name = models.TextField(db_index=True)
    user_id = models.TextField(blank=True)
    created = models.DateTimeField(auto_now_add=True)
    updated = models.DateTimeField(null=True)

    objects = BungiesearchManager()
Пример #3
0
class App(models.Model):
    QUEUED_STATUS = 'QUEUED'
    DOWNLOADING = 'DOWNL'
    DOWNLOADED = 'DLED'
    START_STAT = 'STATBEG'
    START_STAT = 'STATEND'
    START_VF = 'STARTVF'
    END_VF = 'ENDVF'

    # app_id = models.AutoField(db_index=True, blank=True)
    status = models.CharField(default="QUEUED", max_length=20)
    package_name = models.CharField(db_index=True, max_length=100)
    app_name = models.CharField(blank=True, db_index=True, max_length=100)
    version = models.CharField(blank=True, max_length=30)
    md5 = models.CharField(db_index=True, max_length=100)
    sha1 = models.CharField(db_index=True, max_length=100)
    uploaded = models.DateField(auto_now_add=True, blank=True)
    targetSDK = models.CharField(blank=True, max_length=10)
    minSDK = models.CharField(blank=True, max_length=10)
    bayesResult = models.NullBooleanField(blank=True)
    bayesConfidence = models.DecimalField(blank=True,
                                          null=True,
                                          max_digits=4,
                                          decimal_places=3)

    objects = BungiesearchManager()

    def __unicode__(self):
        return self.package_name + ' ' + self.version

    class Meta:
        app_label = 'frontpage'
Пример #4
0
class Unmanaged(models.Model):
    package_name = models.CharField(max_length=150, db_index=True)

    objects = BungiesearchManager()

    class Meta:
        app_label = 'frontpage'
Пример #5
0
class ManangedButEmpty(models.Model):
    field_title = models.TextField(db_index=True)
    field_description = models.TextField(blank=True)

    objects = BungiesearchManager()

    class Meta:
        app_label = 'core'
Пример #6
0
class NoUpdatedField(models.Model):
    title = models.TextField(db_index=True)
    description = models.TextField(blank=True)

    objects = BungiesearchManager()

    class Meta:
        app_label = 'core'
Пример #7
0
class Activity(models.Model):
    name = models.CharField(max_length=150)
    app = models.ForeignKey(App)
    objects = BungiesearchManager()

    def __unicode__(self):
        return self.name

    class Meta:
        app_label = 'frontpage'
Пример #8
0
class User(models.Model):
    name = models.TextField(db_index=True)
    user_id = models.TextField(blank=True, primary_key=True)
    about = models.TextField(blank=True)
    created = models.DateTimeField(auto_now_add=True)
    updated = models.DateTimeField(null=True)

    objects = BungiesearchManager()

    class Meta:
        app_label = 'core'
Пример #9
0
class Sourcefile(models.Model):
    file_name = models.CharField(max_length=200)
    file_contents = models.TextField()
    app = models.ForeignKey(App)

    objects = BungiesearchManager()

    def __unicode__(self):
        return self.file_name

    class Meta:
        app_label = 'frontpage'
Пример #10
0
class Permission(models.Model):
    name = models.CharField(max_length=100)
    perm_description = models.TextField()
    perm_danger = models.TextField()
    app = models.ManyToManyField(App)

    objects = BungiesearchManager()

    def __unicode__(self):
        return self.name

    class Meta:
        app_label = 'frontpage'
Пример #11
0
class App_metadata(models.Model):
    app_name = models.CharField(blank=True, db_index=True, max_length=100)
    version_string = models.CharField(blank=True, max_length=30)
    author = models.CharField(blank=True, max_length=80)
    date_upload = models.CharField(blank=True, max_length=20)
    description = models.TextField()
    app = models.ForeignKey(App)
    objects = BungiesearchManager()

    def __unicode__(self):
        return self.app_name

    class Meta:
        app_label = 'frontpage'
Пример #12
0
class DynamicTestResults(models.Model):
    name = models.CharField(max_length=150)
    status = models.CharField(max_length=150)
    count = models.IntegerField()
    description = models.TextField()
    vuln = models.ForeignKey(VulnerabilityResult)
    objects = BungiesearchManager()

    #app = models.ForeignKey(App)

    def __unicode__(self):
        return self.name

    class Meta:
        app_label = 'frontpage'
Пример #13
0
class VulnerabilityResult(models.Model):
    name = models.CharField(max_length=150)
    description = models.TextField()
    confidence = models.CharField(max_length=10, null=True)
    dynamicTest = models.BooleanField(default=False)
    dynamic_test_params = models.TextField(null=True)
    app = models.ForeignKey(App)

    objects = BungiesearchManager()

    def __unicode__(self):
        return self.name

    class Meta:
        app_label = 'frontpage'