summaryrefslogtreecommitdiff
path: root/wiki/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'wiki/models.py')
-rw-r--r--wiki/models.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/wiki/models.py b/wiki/models.py
new file mode 100644
index 00000000..2b8b16fc
--- /dev/null
+++ b/wiki/models.py
@@ -0,0 +1,16 @@
+from django.db import models
+from django.contrib.auth.models import User
+
+class Wikipage(models.Model):
+ """Wiki page storage"""
+ title = models.CharField(maxlength=255)
+ content = models.TextField()
+ last_author = models.ForeignKey(User)
+ class Meta:
+ db_table = 'wikipages'
+
+ def editurl(self):
+ return "/wiki/edit/" + self.title + "/"
+
+ def __repr__(self):
+ return self.title