# Path: config/settings.py
# SANITIZER_ALLOWED_TAGS = [
#     'a', 'p', 'b', 'u', 'i', 'h1', 'h2', 'h3', 'img', 'br', 'table', 'tbody',
#     'tr', 'td', 'span', 'li', 'ul'
# ]
# 
# SANITIZER_ALLOWED_ATTRIBUTES = [ 'href', 'src', 'style', 'width', 'height']


from django import forms
from django.utils.translation import ugettext as _
from sanitizer.forms import SanitizedCharField
from config.settings import SANITIZER_ALLOWED_TAGS, SANITIZER_ALLOWED_ATTRIBUTES
# -*- coding: utf-8 -*-
# Copyright (c) 2012 Fabian Barkhau <fabian.barkhau@gmail.com>                  
# License: MIT (see LICENSE.TXT file) 




class Create(forms.Form):

    name    = forms.CharField(label=_("TITLE"))
    content = SanitizedCharField(label=_("CONTENT"), widget=forms.Textarea,
                                 max_length=50000, allowed_tags=SANITIZER_ALLOWED_TAGS,
                                 allowed_attributes=SANITIZER_ALLOWED_ATTRIBUTES, 
                                 strip=False)


class Edit(forms.Form):

    name    = forms.CharField(label=_("TITLE"))
    content = SanitizedCharField(label=_("CONTENT"), widget=forms.Textarea,

# Path: config/settings.py
# SANITIZER_ALLOWED_TAGS = [
#     'a', 'p', 'b', 'u', 'i', 'h1', 'h2', 'h3', 'img', 'br', 'table', 'tbody',
#     'tr', 'td', 'span', 'li', 'ul'
# ]
# 
# SANITIZER_ALLOWED_ATTRIBUTES = [ 'href', 'src', 'style', 'width', 'height']


# Path: apps/blog/forms.py
from django import forms
from django.utils.translation import ugettext as _
from sanitizer.forms import SanitizedCharField
from config.settings import SANITIZER_ALLOWED_TAGS, SANITIZER_ALLOWED_ATTRIBUTES

# -*- coding: utf-8 -*-
# Copyright (c) 2012 Fabian Barkhau <fabian.barkhau@gmail.com>                  
# License: MIT (see LICENSE.TXT file) 




class Create(forms.Form):

    name    = forms.CharField(label=_("TITLE"))
    content = SanitizedCharField(label=_("CONTENT"), widget=forms.Textarea,
                                 max_length=50000, allowed_tags=SANITIZER_ALLOWED_TAGS,
                                 allowed_attributes=SANITIZER_ALLOWED_ATTRIBUTES, 
                                 strip=False)


class Edit(forms.Form):

    name    = forms.CharField(label=_("TITLE"))
    content = SanitizedCharField(label=_("CONTENT"), widget=forms.Textarea,

                                 max_length=50000, allowed_tags=SANITIZER_ALLOWED_TAGS,