Skip to content

Instantly share code, notes, and snippets.

@sweemeng
Created April 23, 2010 05:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sweemeng/376205 to your computer and use it in GitHub Desktop.
Save sweemeng/376205 to your computer and use it in GitHub Desktop.
from django.db import models
# Create your models here.
ISSUE_TYPE = (
('Broken Streetlight','Broken Streetlight'),
('Pipe Leakage','Pipe Leakage'),
('Pot Hole','Pot Hole'),
('alien infestation','alien infestation'),
('stray dogs','stray dogs'),
('runaway velociraptor','runaways velociraptor')
)
class Issue(models.Model):
title = models.CharField(max_length=140)
description = models.TextField()
location = models.TextField()
votes = models.IntegerField()
issuetype = models.CharField(max_length=140,choices=ISSUE_TYPE)
closed = models.BooleanField()
created = models.DateTimeField(auto_now_add = True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment