from django.db import models
-
-# Create your models here.
-class EEObject(models.Model):
- created = models.DateField(auto_now_add=1)
- modified = models.DateField(auto_now=1)
from django.db import models
-from ee.base.models import EEObject
# Create your models here.
-class Character(EEObject):
+class Character(models.Model):
+ created = models.DateField(auto_now_add=1)
+ modified = models.DateField(auto_now=1)
name = models.CharField(max_length=255)
def __str__(self):
return self.name
class Admin:
pass
-class Influence(EEObject):
+class Influence(models.Model):
+ created = models.DateField(auto_now_add=1)
+ modified = models.DateField(auto_now=1)
contact = models.CharField(max_length=255)
character = models.ForeignKey(Character, edit_inline=models.TABULAR, num_in_admin=3, core=True)
description = models.TextField()