componentsDjangoType 2.0.24__tar.gz → 2.0.26__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.24/componentsDjangoType.egg-info → componentsdjangotype-2.0.26}/PKG-INFO +1 -1
- componentsdjangotype-2.0.26/componentsDjangoType/__pycache__/__init__.cpython-312.pyc +0 -0
- componentsdjangotype-2.0.26/componentsDjangoType/management/__pycache__/__init__.cpython-312.pyc +0 -0
- componentsdjangotype-2.0.26/componentsDjangoType/management/commands/__pycache__/__init__.cpython-312.pyc +0 -0
- componentsdjangotype-2.0.26/componentsDjangoType/management/commands/__pycache__/createApp.cpython-312.pyc +0 -0
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26/componentsDjangoType.egg-info}/PKG-INFO +1 -1
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/componentsDjangoType.egg-info/SOURCES.txt +5 -4
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/services/authenticator_configurator.py +39 -5
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/setup.py +1 -1
- componentsdjangotype-2.0.24/services/core/__init__.py +0 -0
- componentsdjangotype-2.0.24/services/core/urls_page.py +0 -10
- componentsdjangotype-2.0.24/services/core/views_page.py +0 -24
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/LICENSE +0 -0
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/MANIFEST.in +0 -0
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/README.md +0 -0
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/componentsDjangoType/__init__.py +0 -0
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/componentsDjangoType/management/__init__.py +0 -0
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/componentsDjangoType/management/commands/__init__.py +0 -0
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/componentsDjangoType/management/commands/createApp.py +0 -0
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/componentsDjangoType/management/commands/createcomponent.py +0 -0
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/componentsDjangoType.egg-info/dependency_links.txt +0 -0
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/componentsDjangoType.egg-info/requires.txt +0 -0
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/componentsDjangoType.egg-info/top_level.txt +0 -0
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/services/__init__.py +0 -0
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/services/authentication/__init__.py +0 -0
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/services/authentication/auth.py +0 -0
- {componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/setup.cfg +0 -0
Binary file
|
componentsdjangotype-2.0.26/componentsDjangoType/management/__pycache__/__init__.cpython-312.pyc
ADDED
Binary file
|
Binary file
|
Binary file
|
@@ -8,14 +8,15 @@ componentsDjangoType.egg-info/SOURCES.txt
|
|
8
8
|
componentsDjangoType.egg-info/dependency_links.txt
|
9
9
|
componentsDjangoType.egg-info/requires.txt
|
10
10
|
componentsDjangoType.egg-info/top_level.txt
|
11
|
+
componentsDjangoType/__pycache__/__init__.cpython-312.pyc
|
11
12
|
componentsDjangoType/management/__init__.py
|
13
|
+
componentsDjangoType/management/__pycache__/__init__.cpython-312.pyc
|
12
14
|
componentsDjangoType/management/commands/__init__.py
|
13
15
|
componentsDjangoType/management/commands/createApp.py
|
14
16
|
componentsDjangoType/management/commands/createcomponent.py
|
17
|
+
componentsDjangoType/management/commands/__pycache__/__init__.cpython-312.pyc
|
18
|
+
componentsDjangoType/management/commands/__pycache__/createApp.cpython-312.pyc
|
15
19
|
services/__init__.py
|
16
20
|
services/authenticator_configurator.py
|
17
21
|
services/authentication/__init__.py
|
18
|
-
services/authentication/auth.py
|
19
|
-
services/core/__init__.py
|
20
|
-
services/core/urls_page.py
|
21
|
-
services/core/views_page.py
|
22
|
+
services/authentication/auth.py
|
{componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/services/authenticator_configurator.py
RENAMED
@@ -117,6 +117,39 @@ path('', include('home.urls'))
|
|
117
117
|
stdout.write(f"No fue necesario realizar cambios en '{project_urls_path}'.\n")
|
118
118
|
|
119
119
|
def creation_auth(self, stdout):
|
120
|
+
services_dir = os.path.join(self.app_name, 'services')
|
121
|
+
authentication_dir = os.path.join(services_dir, 'authentication')
|
122
|
+
os.makedirs(authentication_dir, exist_ok=True)
|
123
|
+
|
124
|
+
# Ruta para el nuevo archivo a crear
|
125
|
+
authentication_path = os.path.join(authentication_dir, 'authentication.py')
|
126
|
+
|
127
|
+
# Usar el atributo __file__ del módulo 'auth' para obtener la ruta del archivo fuente
|
128
|
+
auth_source_path = os.path.abspath(auth.__file__)
|
129
|
+
|
130
|
+
if not os.path.exists(auth_source_path):
|
131
|
+
stdout.write(f"El archivo fuente '{auth_source_path}' no existe. Verifica la instalación del paquete.")
|
132
|
+
return
|
133
|
+
|
134
|
+
if not os.path.exists(authentication_path):
|
135
|
+
stdout.write(f"Creando el archivo '{authentication_path}'...")
|
136
|
+
|
137
|
+
# Leer el contenido de 'auth.py' del paquete
|
138
|
+
try:
|
139
|
+
with open(auth_source_path, 'r') as source_file:
|
140
|
+
auth_code = source_file.read()
|
141
|
+
|
142
|
+
# Escribir el contenido en el nuevo archivo 'authentication.py'
|
143
|
+
with open(authentication_path, 'w') as dest_file:
|
144
|
+
dest_file.write(auth_code)
|
145
|
+
|
146
|
+
stdout.write(f"El archivo '{authentication_path}' fue creado y el código fue copiado.")
|
147
|
+
except Exception as e:
|
148
|
+
stdout.write(f"Error al copiar el archivo: {e}")
|
149
|
+
else:
|
150
|
+
stdout.write(f"El archivo '{authentication_path}' ya existe.")
|
151
|
+
|
152
|
+
def create_views_urls(self, stdout):
|
120
153
|
home_dir = 'Home' # Nombre de la aplicación Home
|
121
154
|
views_path = os.path.join(home_dir, 'views.py')
|
122
155
|
urls_path = os.path.join(home_dir, 'urls.py')
|
@@ -160,11 +193,11 @@ def logged(request):
|
|
160
193
|
from . import views
|
161
194
|
|
162
195
|
urlpatterns = [
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
196
|
+
path("", views.home, name='home'),
|
197
|
+
path("signup", views.signup, name='signup'),
|
198
|
+
path("login", views.signing, name='login'),
|
199
|
+
path("logout", views.signout, name='logout'),
|
200
|
+
path("logged", views.logged, name='logged'),
|
168
201
|
]
|
169
202
|
'''
|
170
203
|
with open(urls_path, 'w') as urls_file:
|
@@ -195,5 +228,6 @@ urlpatterns = [
|
|
195
228
|
|
196
229
|
|
197
230
|
|
231
|
+
|
198
232
|
|
199
233
|
|
File without changes
|
@@ -1,10 +0,0 @@
|
|
1
|
-
from django.urls import path
|
2
|
-
from . import views
|
3
|
-
|
4
|
-
urlpatterns = [
|
5
|
-
path("", views.home, name='home'),
|
6
|
-
path("signup", views.signup, name='signup'),
|
7
|
-
path("login", views.signing, name='login'),
|
8
|
-
path("logout", views.signout, name='logout'),
|
9
|
-
path("logged", views.logged, name='logged'),
|
10
|
-
]
|
@@ -1,24 +0,0 @@
|
|
1
|
-
from django.shortcuts import render
|
2
|
-
from django.contrib.auth.decorators import login_required
|
3
|
-
from services.authentication.auth import Authentication
|
4
|
-
|
5
|
-
# Create your views here.
|
6
|
-
|
7
|
-
def home(request):
|
8
|
-
return render(request, 'home.html')
|
9
|
-
|
10
|
-
def signup(request):
|
11
|
-
return Authentication.get_signup(request)
|
12
|
-
|
13
|
-
def signout(request):
|
14
|
-
return Authentication.get_signout(request)
|
15
|
-
|
16
|
-
def signing(request):
|
17
|
-
return Authentication.get_signing(request)
|
18
|
-
|
19
|
-
@login_required
|
20
|
-
def logged(request):
|
21
|
-
return Authentication.get_logged(request)
|
22
|
-
|
23
|
-
def custom_dispatch(request, *args, **kwargs):
|
24
|
-
return Authentication.dispatch(request, *args, **kwargs)
|
File without changes
|
File without changes
|
File without changes
|
{componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/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
|
{componentsdjangotype-2.0.24 → componentsdjangotype-2.0.26}/services/authentication/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|