componentsDjangoType 2.0.38__tar.gz → 2.0.40__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {componentsdjangotype-2.0.38/componentsDjangoType.egg-info → componentsdjangotype-2.0.40}/PKG-INFO +1 -1
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40/componentsDjangoType.egg-info}/PKG-INFO +1 -1
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/authentication/auth.py +8 -3
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/authenticator_configurator.py +1 -1
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/setup.py +1 -1
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/LICENSE +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/MANIFEST.in +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/README.md +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/componentsDjangoType/__init__.py +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/componentsDjangoType/__pycache__/__init__.cpython-312.pyc +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/componentsDjangoType/management/__init__.py +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/componentsDjangoType/management/__pycache__/__init__.cpython-312.pyc +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/componentsDjangoType/management/commands/__init__.py +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/componentsDjangoType/management/commands/__pycache__/__init__.cpython-312.pyc +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/componentsDjangoType/management/commands/__pycache__/createApp.cpython-312.pyc +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/componentsDjangoType/management/commands/createApp.py +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/componentsDjangoType/management/commands/createcomponent.py +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/componentsDjangoType.egg-info/SOURCES.txt +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/componentsDjangoType.egg-info/dependency_links.txt +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/componentsDjangoType.egg-info/requires.txt +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/componentsDjangoType.egg-info/top_level.txt +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/__init__.py +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/authentication/__init__.py +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/authentication/forms.py +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/copy_source.py +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/utils/css/authentication.css +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/utils/js/alertErrors.js +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/utils/views/home.html +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/utils/views/layouts/index.html +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/utils/views/logged.html +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/utils/views/login.html +0 -0
- {componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/utils/views/signup.html +0 -0
- {componentsdjangotype-2.0.38 → 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
|
})
|
{componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/authenticator_configurator.py
RENAMED
@@ -241,7 +241,7 @@ urlpatterns = [
|
|
241
241
|
("services.utils.css", "authentication.css", os.path.join(css_dir, "authentication.css")),
|
242
242
|
("services.utils.views.layouts", "index.html", os.path.join(layouts_dir, "index.html")),
|
243
243
|
("services.utils.views", "home.html", os.path.join(templates_dir, "home.html")),
|
244
|
-
("services.utils.views", "
|
244
|
+
("services.utils.views", "signup.html", os.path.join(templates_dir, "signup.html")),
|
245
245
|
("services.utils.views", "login.html", os.path.join(templates_dir, "login.html")),
|
246
246
|
("services.utils.views", "logged.html", os.path.join(templates_dir, "logged.html")),
|
247
247
|
]
|
File without changes
|
File without changes
|
File without changes
|
{componentsdjangotype-2.0.38 → 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.38 → componentsdjangotype-2.0.40}/services/authentication/__init__.py
RENAMED
File without changes
|
{componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/authentication/forms.py
RENAMED
File without changes
|
File without changes
|
{componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/utils/css/authentication.css
RENAMED
File without changes
|
{componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/utils/js/alertErrors.js
RENAMED
File without changes
|
File without changes
|
{componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/utils/views/layouts/index.html
RENAMED
File without changes
|
{componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/utils/views/logged.html
RENAMED
File without changes
|
File without changes
|
{componentsdjangotype-2.0.38 → componentsdjangotype-2.0.40}/services/utils/views/signup.html
RENAMED
File without changes
|
File without changes
|