@@ -50,13 +50,14 @@ class Page(models.Model):
self.updated = datetime.datetime.now()
super(Page, self).save(*args, **kwargs)
def clean_fields(self, exclude=None):
super(Page, self).clean_fields(exclude)
if not re.match(settings.SYMPOSION_PAGE_REGEX, self.path):
raise ValidationError({"path": [_("Path can only contain letters, numbers and hyphens and end with /")]})
raise ValidationError(
{"path": [_("Path can only contain letters, numbers and hyphens and end with /")]})
reversion.register(Page)
def generate_filename(instance, filename):