legacy-dotfiles/main/models.py

25 lines
726 B
Python
Raw Normal View History

2011-10-17 01:34:04 +02:00
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)