Commit ec358232dcdf7e539d975a506e6f1a0eb23cdd7e

Authored by Zambom
1 parent 02d981ad

Adjusting webpage content input

webpage/forms.py
... ... @@ -65,9 +65,9 @@ class WebpageForm(forms.ModelForm):
65 65  
66 66 def clean_content(self):
67 67 content = self.cleaned_data.get('content', '')
68   - content = strip_tags(content)
  68 + cleaned_content = strip_tags(content)
69 69  
70   - if content == '':
  70 + if cleaned_content == '':
71 71 self._errors['content'] = [_('This field is required.')]
72 72  
73 73 return ValueError
... ...
webpage/templates/webpages/window_view.html
1   -{{ webpage.content }}
2 1 \ No newline at end of file
  2 +{{ webpage.content|safe }}
... ...