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