# Path: website/forms.py
# class ContactForm(BaseContactForm):
#     def __init__(self, *args, **kwargs):
#         super().__init__(*args, **kwargs)
# 
#         self.fields['name'].label = 'Nome'
#         self.fields['email'].label = 'Email'
#         self.fields['body'].label = 'Mensagem'
#         self.fields['body'].help_text =\
#             'Deixe sua mensagem e nós retornaremos o quanto antes.'


from django.template import Library
from ..forms import ContactForm



register = Library()


@register.assignment_tag(takes_context=True)
def get_contact_form(context):

# Path: website/forms.py
# class ContactForm(BaseContactForm):
#     def __init__(self, *args, **kwargs):
#         super().__init__(*args, **kwargs)
# 
#         self.fields['name'].label = 'Nome'
#         self.fields['email'].label = 'Email'
#         self.fields['body'].label = 'Mensagem'
#         self.fields['body'].help_text =\
#             'Deixe sua mensagem e nós retornaremos o quanto antes.'


# Path: website/templatetags/contact_form_tags.py
from django.template import Library
from ..forms import ContactForm




register = Library()


@register.assignment_tag(takes_context=True)
def get_contact_form(context):

    return ContactForm(request=context.get('request'))