summaryrefslogtreecommitdiff
path: root/root/models.py
diff options
context:
space:
mode:
authorMark Weiman <mark.weiman@markzz.com>2015-10-11 01:00:38 -0400
committerMark Weiman <mark.weiman@markzz.com>2015-10-11 01:00:38 -0400
commit57aa89824a8dabb631c15af986a39e779d0fe3cb (patch)
tree2df3bf79026e1c544e57375566297bcc7634afa5 /root/models.py
downloadwebsite-57aa89824a8dabb631c15af986a39e779d0fe3cb.tar.gz
website-57aa89824a8dabb631c15af986a39e779d0fe3cb.zip
inital
Diffstat (limited to 'root/models.py')
-rw-r--r--root/models.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/root/models.py b/root/models.py
new file mode 100644
index 0000000..87fd1eb
--- /dev/null
+++ b/root/models.py
@@ -0,0 +1,27 @@
+from django.db import models
+
+from django.utils.encoding import smart_text
+
+# Create your models here.
+
+
+class Page(models.Model):
+ name = models.CharField(max_length=20, blank=True, null=True, unique=True)
+ header_image = models.CharField(max_length=255, blank=False, null=False, default='&black')
+ title = models.CharField(max_length=255, blank=False, null=False)
+ subtitle = models.CharField(max_length=255, blank=True, null=True)
+ body = models.TextField(blank=True, null=True)
+ edited = models.DateTimeField(blank=False, null=False)
+
+ def __str__(self):
+ return smart_text('%s' % (self.name,))
+
+
+class SocialMediaButton(models.Model):
+ name = models.CharField(max_length=150, blank=False, null=False)
+ type = models.CharField(max_length=150, blank=False, null=False)
+ account = models.CharField(max_length=150, blank=False, null=False)
+ url = models.URLField(max_length=255, blank=False, null=False)
+
+ def __str__(self):
+ return smart_text('%s - %s' % (self.type, self.account,))