Skip to content

Instantly share code, notes, and snippets.

@jtiai
Created May 2, 2013 11:45
Show Gist options
  • Save jtiai/5501687 to your computer and use it in GitHub Desktop.
Save jtiai/5501687 to your computer and use it in GitHub Desktop.
Discriminator sample
class AssetTask(models.Model):
TASK_TYPE = (
(0 , _('normal')),
(1 , _('failure')),
(2 , _('duplicate')),
(99, _('unknown')),
)
task_type = models.IntegerField(_('task type'), choices=TASK_TYPE, default=0)
asset = models.ForeignKey(Asset)
task = models.ForeignKey(Task)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment