componentsDjangoType 2.0.39__tar.gz → 2.0.40__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {componentsdjangotype-2.0.39/componentsDjangoType.egg-info → componentsdjangotype-2.0.40}/PKG-INFO +1 -1
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40/componentsDjangoType.egg-info}/PKG-INFO +1 -1
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/authentication/auth.py +8 -3
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/setup.py +1 -1
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/LICENSE +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/MANIFEST.in +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/README.md +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/componentsDjangoType/__init__.py +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/componentsDjangoType/__pycache__/__init__.cpython-312.pyc +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/componentsDjangoType/management/__init__.py +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/componentsDjangoType/management/__pycache__/__init__.cpython-312.pyc +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/componentsDjangoType/management/commands/__init__.py +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/componentsDjangoType/management/commands/__pycache__/__init__.cpython-312.pyc +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/componentsDjangoType/management/commands/__pycache__/createApp.cpython-312.pyc +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/componentsDjangoType/management/commands/createApp.py +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/componentsDjangoType/management/commands/createcomponent.py +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/componentsDjangoType.egg-info/SOURCES.txt +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/componentsDjangoType.egg-info/dependency_links.txt +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/componentsDjangoType.egg-info/requires.txt +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/componentsDjangoType.egg-info/top_level.txt +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/__init__.py +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/authentication/__init__.py +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/authentication/forms.py +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/authenticator_configurator.py +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/copy_source.py +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/utils/css/authentication.css +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/utils/js/alertErrors.js +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/utils/views/home.html +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/utils/views/layouts/index.html +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/utils/views/logged.html +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/utils/views/login.html +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/utils/views/signup.html +0 -0
- {componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/setup.cfg +0 -0
@@ -8,23 +8,28 @@ class Authentication:
|
|
8
8
|
@staticmethod
|
9
9
|
def get_signup(request):
|
10
10
|
if request.method == 'GET':
|
11
|
+
# Crear una nueva instancia del formulario en GET
|
11
12
|
return render(request, 'signup.html', {
|
12
|
-
|
13
|
+
'form': customUserCreationform() # Instancia del formulario
|
13
14
|
})
|
14
15
|
elif request.method == 'POST':
|
16
|
+
# Crear una instancia del formulario con los datos enviados
|
15
17
|
form = customUserCreationform(request.POST)
|
16
18
|
if form.is_valid():
|
17
19
|
try:
|
20
|
+
# Si el formulario es válido, guarda el usuario
|
18
21
|
user = form.save()
|
19
22
|
login(request, user)
|
20
23
|
return redirect('logged')
|
21
24
|
except IntegrityError:
|
25
|
+
# Si ocurre un error de integridad (por ejemplo, nombre de usuario duplicado)
|
22
26
|
return render(request, 'signup.html', {
|
23
27
|
'form': form,
|
24
28
|
'error': 'Unable to register. Please try again later.'
|
25
29
|
})
|
26
|
-
|
27
|
-
|
30
|
+
else:
|
31
|
+
# Si el formulario no es válido, muestra los errores
|
32
|
+
return render(request, 'signup.html', {
|
28
33
|
'form': form,
|
29
34
|
'error': 'Please correct the errors below.'
|
30
35
|
})
|
File without changes
|
File without changes
|
File without changes
|
{componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/componentsDjangoType/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/authentication/__init__.py
RENAMED
File without changes
|
{componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/authentication/forms.py
RENAMED
File without changes
|
{componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/authenticator_configurator.py
RENAMED
File without changes
|
File without changes
|
{componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/utils/css/authentication.css
RENAMED
File without changes
|
{componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/utils/js/alertErrors.js
RENAMED
File without changes
|
File without changes
|
{componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/utils/views/layouts/index.html
RENAMED
File without changes
|
{componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/utils/views/logged.html
RENAMED
File without changes
|
File without changes
|
{componentsdjangotype-2.0.39 → componentsdjangotype-2.0.40}/services/utils/views/signup.html
RENAMED
File without changes
|
File without changes
|