fixed linting errors
This commit is contained in:
parent
ecc80b939d
commit
4ab42bf3de
4 changed files with 12 additions and 11 deletions
|
|
@ -2,6 +2,7 @@ from django import forms
|
|||
from django.contrib.auth.forms import UserCreationForm
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
|
||||
class RegistrationForm(UserCreationForm):
|
||||
email = forms.EmailField(label="Email", widget=forms.TextInput(), required=True)
|
||||
first_name = forms.CharField(label="Prénom", widget=forms.TextInput(), required=True)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h1>Création d'utilisateur</h1>
|
||||
<form action = '' method="post">{% csrf_token %}
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<br>
|
||||
<input type="submit" value="Envoyer">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from django.urls import path
|
||||
|
||||
from .views import signup
|
||||
urlpatterns = [
|
||||
path('', signup, name='signup'),
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
from django import forms
|
||||
from django.contrib.auth import login
|
||||
from django.http.response import HttpResponse
|
||||
|
||||
|
||||
from django.shortcuts import redirect, render
|
||||
|
||||
from .forms import RegistrationForm
|
||||
|
||||
|
||||
def signup(request):
|
||||
if request.method == 'POST':
|
||||
form = RegistrationForm(request.POST)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue