Bonjour,
Je débute en django ... et là je suis sec !

Ma page login .html

Code HTML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{% extends "base.html" %}
 
{% block title %}Connexion{% endblock %}
 
{% block bodyId %}loginPage{% endblock %}
 
{% block content %}
	<form action="login" method="post">
	{% if error %}
	    <p class="error">
	    {{ error }}
	    </p>
	{% endif %}
	{% csrf_token %}
	{{ form.as_p }}
	<p>
	    <input type="submit" value="Se connecter" />
	    <a href="???">Créer un compte</a>
	</p>
	</form>
{% endblock %}

Le contenu de forms.py
=>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from django import forms
 
class LoginForm(forms.Form):
    email = forms.EmailField(label="email :")
    password = forms.CharField(label="password :",widget = forms.PasswordInput())
 
    def clean(self):
        cleaned_data = super(LoginForm, self).clean()
        email = cleaned_data.get("email")
        password = cleaned_data.get("password")
 
    # Vérifie que les deux champs sont valides
        if email and password:
            if password != "blabla " or email != "test@test.fr":
                raise forms.ValidationError("Adresse de courriel ou mot de passe erroné.")
 
        return cleaned_data
Et lorsque je teste en local , j'ai ce message
"error on line 17 at column 94: Opening and ending tag mismatch: input line 0 and p"


J'ai beau me frotter les yeux et faire tout sorte de modifications, je ne vois pas la balise ou autres qui coince
Si une âme charitable a une idée, je prends volontiers ...

Voici le source de la page en erreur


Code HTML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Trombinoscoop – Connexion</title>
    <link rel="stylesheet" type="text/css" href="/static/css/style.css" />
  </head>
  <body id="loginPage">
    <header>
 
    </header>
    <section id="content">
 
	<form action="login" method="post">
 
	<input type="hidden" name="csrfmiddlewaretoken" value="zbEn3m5IRhSVgnKZkLoodXBqft3CkNk29krxVcp0CFdV5B9gNV1SPydMp2gPhFP8">
	<p><label for="id_email">email :</label> <input type="email" name="email" id="id_email"></p>
<p><label for="id_password">password :</label> <input type="password" name="password" id="id_password"></p>
	<p>
	    <input type="submit" value="Se connecter" />
	    <a href="???">Créer un compte</a>
	</p>
	</form>
 
    </section>
  </body>
</html>

Une dernière chose, pour le fun, si je charge ce code + le css correspondant sur un de mes sites
ça m'affiche la page correctement donc je pense qu'il y a un soucis dans mon environnement eclipse/django/python en local ?
ex :
http://messinmaisoui.org/err.html


Merci d'avance pour les réponses ...