1 from django.db import models
2 from django.contrib.auth.models import User
4 # Create your models here.
5 class Character(models.Model):
6 created = models.DateField(auto_now_add=1)
7 modified = models.DateField(auto_now=1)
8 name = models.CharField(max_length=255)
9 player = models.ForeignKey(User)
17 class Influence(models.Model):
23 created = models.DateField(auto_now_add=1)
24 modified = models.DateField(auto_now=1)
26 character = models.ForeignKey(Character, null=True, blank=True, edit_inline=models.TABULAR, num_in_admin=3, core=True)
27 contact = models.CharField(max_length=255)
28 description = models.TextField()
29 status = models.TextField(max_length=1, choices=STATUS_CHOICES, default='N')
30 longterm = models.BooleanField(default=False)
33 return self.description[0:10]