Skip to content

Instantly share code, notes, and snippets.

@CapnKernel
Created July 13, 2013 01:43
Show Gist options
  • Save CapnKernel/5989043 to your computer and use it in GitHub Desktop.
Save CapnKernel/5989043 to your computer and use it in GitHub Desktop.
class ItemStatus(models.Model):
name = models.CharField(max_length=96)
class Item(models.Model):
itemStatus_unknown = ItemStatus.objects.get(name="Other")
status = models.ForeignKey(ItemStatus, default=itemStatus_unknown)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment