Ajout connexion/déconnexion à l'espace membres
This commit is contained in:
		
							parent
							
								
									3d1b8a9bee
								
							
						
					
					
						commit
						6c3a1e6ddc
					
				
					 9 changed files with 108 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -30,7 +30,7 @@
 | 
			
		|||
                    <li class="nav-sep">•</li>
 | 
			
		||||
                    <li class="nav-item"><a class="nav-link" href="#">Médias</a></li>
 | 
			
		||||
                    <li class="nav-sep">•</li>
 | 
			
		||||
                    <li class="nav-item"><a class="nav-link" href="#">Espace membres</a></li>
 | 
			
		||||
                    <li class="nav-item"><a class="nav-link{% if request.path == "/membres/" %} active{% endif %}" href="{% url 'membres' %}">Espace membres</a></li>
 | 
			
		||||
                </ul>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										11
									
								
								templates/membres/index.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								templates/membres/index.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    <div class="float-end">
 | 
			
		||||
        <form action="{% url 'logout' %}" method="post">{% csrf_token %}<button class="btn btn-sm btn-light" type="submit">Déconnexion</button></form>
 | 
			
		||||
    </div>
 | 
			
		||||
    <h2>Espace membres</h2>
 | 
			
		||||
    <div class="row">
 | 
			
		||||
        <a href="{% url 'liste-membres' %}">Liste des membres</a>
 | 
			
		||||
    </div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										14
									
								
								templates/membres/liste.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								templates/membres/liste.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
    <h2>Liste des membres</h2>
 | 
			
		||||
    <table class="table table-responsive">
 | 
			
		||||
    {% for membre in object_list %}
 | 
			
		||||
        <tr><td>{{ membre.nom }} {{ membre.prenom }}</td>
 | 
			
		||||
            <td>{{ membre.rue }}<br>{{ membre.npa }} {{ membre.localite }}</td>
 | 
			
		||||
            <td>{{ membre.tel1 }}<br>{{ membre.tel2 }}</td>
 | 
			
		||||
            <td>{{ membre.email }}</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
    </table>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										26
									
								
								templates/registration/login.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								templates/registration/login.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,26 @@
 | 
			
		|||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
<div class="wrapper container">
 | 
			
		||||
    <div class="col-11 col-lg-5 mx-auto">
 | 
			
		||||
        <form class="form-sign mb-3" method="post">
 | 
			
		||||
            {% csrf_token %}
 | 
			
		||||
            <h1 class="fs-2 mb-4">Connexion</h1>
 | 
			
		||||
 | 
			
		||||
            {{ form.non_field_errors }}
 | 
			
		||||
            <div class="mb-4">
 | 
			
		||||
                <label for="id_username" class="form-label w-100">Adresse électronique</label>
 | 
			
		||||
                {{ form.username.errors }} {{ form.username }}
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="mb-3">
 | 
			
		||||
                <label for="id_password" class="form-label w-100">Mot de passe</label>
 | 
			
		||||
                {{ form.password.errors }} {{ form.password }}
 | 
			
		||||
            </div>
 | 
			
		||||
            <!--div class="mb-4">
 | 
			
		||||
                <a href="{% url 'password_reset' %}" class="text-link">Mot de passe oublié</a>
 | 
			
		||||
            </div-->
 | 
			
		||||
            <button class="btn btn-cta btn-light" type="submit">Se connecter</button>
 | 
			
		||||
        </form>
 | 
			
		||||
    </div>            
 | 
			
		||||
</div>
 | 
			
		||||
{% endblock content %}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue