Exemplo n.º 1
0
class FeatureAdoption(Model):
    __core__ = False

    organization = FlexibleForeignKey('sentry.Organization')
    feature_id = models.PositiveIntegerField(choices=[(f.id, f.name) for f in manager.all()])
    date_completed = models.DateTimeField(default=timezone.now)
    complete = models.BooleanField(default=False)
    applicable = models.BooleanField(default=True)  # Is this feature applicable to this team?
    data = JSONField()

    objects = FeatureAdoptionManager()

    __repr__ = sane_repr('organization_id', 'feature_id', 'complete', 'applicable')

    class Meta:
        app_label = 'sentry'
        db_table = 'sentry_featureadoption'
        unique_together = (('organization', 'feature_id'),)
Exemplo n.º 2
0
class FeatureAdoption(Model):
    __core__ = False

    organization = FlexibleForeignKey("sentry.Organization")
    feature_id = models.PositiveIntegerField(
        choices=[(f.id, six.text_type(f.name)) for f in manager.all()]
    )
    date_completed = models.DateTimeField(default=timezone.now)
    complete = models.BooleanField(default=False)
    applicable = models.BooleanField(default=True)  # Is this feature applicable to this team?
    data = JSONField()

    objects = FeatureAdoptionManager()

    __repr__ = sane_repr("organization_id", "feature_id", "complete", "applicable")

    class Meta:
        app_label = "sentry"
        db_table = "sentry_featureadoption"
        unique_together = (("organization", "feature_id"),)