diff --git a/code/haitiwater/apps/authentication/exports.py b/code/haitiwater/apps/authentication/exports.py index 89ab479..647ef04 100644 --- a/code/haitiwater/apps/authentication/exports.py +++ b/code/haitiwater/apps/authentication/exports.py @@ -11,6 +11,13 @@ from django.contrib.contenttypes.models import ContentType from ..authentication.models import Profile from ..water_network.models import Zone + +def edit(request): + print(request.POST) + + return HttpResponse(status=200) + + @csrf_exempt #TODO : this is a hot fix for something I don't understand, remove to debug def connect(request): print("Connection !") diff --git a/code/haitiwater/apps/authentication/forms.py b/code/haitiwater/apps/authentication/forms.py new file mode 100644 index 0000000..fe12daf --- /dev/null +++ b/code/haitiwater/apps/authentication/forms.py @@ -0,0 +1,8 @@ +from django.contrib.auth.forms import PasswordChangeForm +from django import forms + + +class CustomPasswordChangeForm(PasswordChangeForm): + old_password = forms.PasswordInput() + new_password1 = forms.PasswordInput + new_password2 = forms.PasswordInput diff --git a/code/haitiwater/apps/authentication/templates/password.html b/code/haitiwater/apps/authentication/templates/password.html new file mode 100644 index 0000000..b0d52b9 --- /dev/null +++ b/code/haitiwater/apps/authentication/templates/password.html @@ -0,0 +1,27 @@ +{% extends "base.html" %} +{% load static %} + +{% block page_name %} + + Profil de {{ user.get_username }} +{% endblock %} + +{% block page_content %} +
+{% endblock %} \ No newline at end of file diff --git a/code/haitiwater/apps/authentication/templates/password_changed.html b/code/haitiwater/apps/authentication/templates/password_changed.html new file mode 100644 index 0000000..35d06ee --- /dev/null +++ b/code/haitiwater/apps/authentication/templates/password_changed.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} +{% load static %} + +{% block page_name %} + + Profil de {{ user.get_username }} +{% endblock %} + +{% block page_content %} +