Example #1
0
	def save(self, *args, **kwargs):
		self.slug = slugify(self.title)
		self.content_html = markdown(self.content)
		super(WikiPage, self).save(*args, **kwargs)
Example #2
0
	def clean_title(self):
		if slugify(self.cleaned_data['title']) in ('new', 'list'):
			raise forms.ValidationError('This title is not allowed.')
		return self.cleaned_data['title']