summaryrefslogtreecommitdiff
path: root/wiki/models.py
blob: 85f0726c41c163616423a8650ea7e2553a4c362f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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

# vim: set ts=4 sw=4 et: