Esempio n. 1
0
class AnnotatedBug(models.Model):
    url = models.URLField(max_length=200, unique=True)
    title = models.CharField(max_length=500, blank=True)
    description = models.TextField(blank=True, verbose_name='Task Description')
    assigned_to = models.CharField(max_length=200, blank=True)
    mentor = models.CharField(max_length=200, blank=True,
                              verbose_name='Assigned Mentor')
    time_estimate = models.CharField(max_length=200, blank=True,
                                     verbose_name='Estimated Time Commitment')
    STATUS_CHOICES = (
        ('u', 'unclaimed'),
        ('c', 'claimed'),
        ('n', 'needs-review'),
        ('r', 'resolved'),
    )
    status = models.CharField(max_length=1, default='u',
                              choices=STATUS_CHOICES)
    skills = models.ManyToManyField(Skill)
    project = models.ForeignKey(mysite.search.models.Project, null=True)
Esempio n. 2
0
class BugSet(models.Model):
    name = models.CharField(max_length=200, verbose_name='Event Name')

    # Many-to-many relationship with annotated bugs
    bugs = models.ManyToManyField(AnnotatedBug)

    def get_absolute_url(self):
        return reverse(mysite.bugsets.views.listview_index, kwargs={
            'pk': self.pk,
            'slug': slugify(self.name),
        })
Esempio n. 3
0
class Skill(models.Model):
    text = models.CharField(max_length=200, unique=True)
Esempio n. 4
0
class Skill(models.Model):
    text = models.CharField(max_length=200, unique=True)

    def __unicode__(self):
        return self.text