I can't answer on your issue exactly, but <!DOCTYPE html> is not an XML doctype. It's the html5 doctype which as far as I know is SGML and not XML.
Try removing the line starting with <?XML and see if it fix your error. On 28 Feb 2017 7:46 p.m., "chun974" <[email protected]> wrote: Hi all, I have an problem. When I use the django library form, It create an attribute "required" for an input. But when I look on my explorer (firefox or chrome or IE) i have a XML error. "XML parsing error: malformed". this is my code : " class LoginForm(forms.Form): email = forms.EmailField(label='Courriel :') password = forms.CharField(label='Mot de passe :', widget = forms.PasswordInput) def clean(self): cleaned_data = super (LoginForm,self).clean() email = cleaned_data.get("email") password = cleaned_data.get("password") if email and password: if password != 'bob' or email != '[email protected]' : raise forms.ValidationError("Adresse de courriel ou mot de passe erroné.") return cleaned_data " this is my déclaration for XML and doctype : " <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr"> " I can put "required=False" and it's OK, but I want that my input is required (required=True it's not OK) XML don't accept that required attribute is alone, whithout "= someting". If someone has had this problem? Django 1.10 Firefox last update -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/ msgid/django-users/8cb6a10b-fc89-4f9a-814e-a905ea9eef6b%40googlegroups.com <https://groups.google.com/d/msgid/django-users/8cb6a10b-fc89-4f9a-814e-a905ea9eef6b%40googlegroups.com?utm_medium=email&utm_source=footer> . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEuG%2BTZpLqvRqkWXCCxN4P4fwOwedQkRuKEOd4VG0s9vaR0uRw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

