diff options
author | Tom Willemsen | 2011-10-17 01:34:04 +0200 |
---|---|---|
committer | Tom Willemsen | 2011-10-17 01:34:04 +0200 |
commit | 4b29603d79cc1f79c66786684f27ec9abfbaa825 (patch) | |
tree | 655c321b7ee3b0cc919ab3b7bf937b50fc13c69c /main/models.py | |
download | dotfiles-4b29603d79cc1f79c66786684f27ec9abfbaa825.tar.gz dotfiles-4b29603d79cc1f79c66786684f27ec9abfbaa825.zip |
Initial commit
Diffstat (limited to 'main/models.py')
-rw-r--r-- | main/models.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py new file mode 100644 index 0000000..8ecddec --- /dev/null +++ b/main/models.py @@ -0,0 +1,24 @@ +from django.db import models + +class Tag(models.Model): + name = models.CharField(primary_key=True, max_length=200) + + def __unicode__(self): + return self.name + +class Activity(models.Model): + ACTCATEGORY_CHOICES = ( + ('blog', 'Blog post'), + ('project', 'Project page'), + ('link', 'Link'), + ) + ACTTYPE_CHOICES = ( + ('add', 'Add'), + ('edit', 'Edit'), + ('delete', 'Delete'), + ) + date = models.DateTimeField(auto_now=True) + actcategory = models.CharField(max_length=100, choices=ACTCATEGORY_CHOICES) + actdescription = models.CharField(max_length=500) + acttype = models.CharField(max_length=6) + objpk = models.CharField(max_length=300, null=True) |