Permalink
Browse files

add in basic hero actions

  • Loading branch information...
1 parent e1aa62a commit 1ad1fbfe31cc8f7272459666b5ee309fa675045a @tswicegood tswicegood committed Mar 24, 2012
Showing with 18 additions and 1 deletion.
  1. +18 −1 hero_content/models.py
View
@@ -1,3 +1,20 @@
from django.db import models
-# Create your models here.
+
+class Hero(models.Model):
+ title = models.CharField(max_length=200)
+ summary = models.TextField()
+ body = models.TextField()
+
+ def __unicode__(self):
+ return self.title
+
+
+class HeroAction(models.Model):
+ title = models.CharField(max_length=200)
+ url = models.URLField()
+ is_default = models.BooleanField()
+ hero = models.ForeignKey(Hero, related_name="actions")
+
+ def __unicode__(self):
+ return "%s (%s)" % (self.title, self.url)

0 comments on commit 1ad1fbf

Please sign in to comment.