componentsDjangoType 2.0.25__tar.gz → 2.0.29__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {componentsdjangotype-2.0.25/componentsDjangoType.egg-info → componentsdjangotype-2.0.29}/PKG-INFO +1 -1
- componentsdjangotype-2.0.29/componentsDjangoType/__pycache__/__init__.cpython-312.pyc +0 -0
- componentsdjangotype-2.0.29/componentsDjangoType/management/__pycache__/__init__.cpython-312.pyc +0 -0
- componentsdjangotype-2.0.29/componentsDjangoType/management/commands/__pycache__/__init__.cpython-312.pyc +0 -0
- componentsdjangotype-2.0.29/componentsDjangoType/management/commands/__pycache__/createApp.cpython-312.pyc +0 -0
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29/componentsDjangoType.egg-info}/PKG-INFO +1 -1
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/componentsDjangoType.egg-info/SOURCES.txt +5 -4
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/services/authenticator_configurator.py +43 -16
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/setup.py +1 -1
- componentsdjangotype-2.0.25/services/core/__init__.py +0 -0
- componentsdjangotype-2.0.25/services/core/urls_page.py +0 -10
- componentsdjangotype-2.0.25/services/core/views_page.py +0 -24
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/LICENSE +0 -0
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/MANIFEST.in +0 -0
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/README.md +0 -0
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/componentsDjangoType/__init__.py +0 -0
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/componentsDjangoType/management/__init__.py +0 -0
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/componentsDjangoType/management/commands/__init__.py +0 -0
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/componentsDjangoType/management/commands/createApp.py +0 -0
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/componentsDjangoType/management/commands/createcomponent.py +0 -0
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/componentsDjangoType.egg-info/dependency_links.txt +0 -0
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/componentsDjangoType.egg-info/requires.txt +0 -0
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/componentsDjangoType.egg-info/top_level.txt +0 -0
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/services/__init__.py +0 -0
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/services/authentication/__init__.py +0 -0
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/services/authentication/auth.py +0 -0
- {componentsdjangotype-2.0.25 → componentsdjangotype-2.0.29}/setup.cfg +0 -0
Binary file
|
componentsdjangotype-2.0.29/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.25 → componentsdjangotype-2.0.29}/services/authenticator_configurator.py
RENAMED
@@ -89,22 +89,15 @@ path('', include('home.urls'))
|
|
89
89
|
|
90
90
|
updated = False
|
91
91
|
|
92
|
-
# Verificar si 'include' está importado
|
93
|
-
if 'include' not in urls_content:
|
94
|
-
stdout.write("Agregando 'include' a los imports.\n")
|
95
|
-
urls_content = urls_content.replace(
|
96
|
-
"from django.urls import path",
|
97
|
-
"from django.urls import path, include" # Asegura que 'include' se agregue
|
98
|
-
)
|
99
|
-
updated = True
|
100
|
-
|
101
92
|
# Verificar si la ruta de 'Home.urls' está en 'urlpatterns'
|
102
|
-
if "include('
|
93
|
+
if "include('Home.urls')" not in urls_content:
|
103
94
|
stdout.write("Agregando ruta para 'home.urls'.\n")
|
104
95
|
# Asegúrate de agregar la ruta en el lugar adecuado dentro de 'urlpatterns'
|
105
96
|
urls_content = urls_content.replace(
|
97
|
+
"from django.urls import path",
|
98
|
+
"from django.urls import path, include"
|
106
99
|
"urlpatterns = [",
|
107
|
-
"urlpatterns = [
|
100
|
+
"urlpatterns = [path('admin/', admin.site.urls),\n path('', include('Home.urls')),"
|
108
101
|
)
|
109
102
|
updated = True
|
110
103
|
|
@@ -116,6 +109,39 @@ path('', include('home.urls'))
|
|
116
109
|
else:
|
117
110
|
stdout.write(f"No fue necesario realizar cambios en '{project_urls_path}'.\n")
|
118
111
|
|
112
|
+
def creation_auth(self, stdout):
|
113
|
+
services_dir = os.path.join(self.app_name, 'services')
|
114
|
+
authentication_dir = os.path.join(services_dir, 'authentication')
|
115
|
+
os.makedirs(authentication_dir, exist_ok=True)
|
116
|
+
|
117
|
+
# Ruta para el nuevo archivo a crear
|
118
|
+
authentication_path = os.path.join(authentication_dir, 'authentication.py')
|
119
|
+
|
120
|
+
# Usar el atributo __file__ del módulo 'auth' para obtener la ruta del archivo fuente
|
121
|
+
auth_source_path = os.path.abspath(auth.__file__)
|
122
|
+
|
123
|
+
if not os.path.exists(auth_source_path):
|
124
|
+
stdout.write(f"El archivo fuente '{auth_source_path}' no existe. Verifica la instalación del paquete.")
|
125
|
+
return
|
126
|
+
|
127
|
+
if not os.path.exists(authentication_path):
|
128
|
+
stdout.write(f"Creando el archivo '{authentication_path}'...")
|
129
|
+
|
130
|
+
# Leer el contenido de 'auth.py' del paquete
|
131
|
+
try:
|
132
|
+
with open(auth_source_path, 'r') as source_file:
|
133
|
+
auth_code = source_file.read()
|
134
|
+
|
135
|
+
# Escribir el contenido en el nuevo archivo 'authentication.py'
|
136
|
+
with open(authentication_path, 'w') as dest_file:
|
137
|
+
dest_file.write(auth_code)
|
138
|
+
|
139
|
+
stdout.write(f"El archivo '{authentication_path}' fue creado y el código fue copiado.")
|
140
|
+
except Exception as e:
|
141
|
+
stdout.write(f"Error al copiar el archivo: {e}")
|
142
|
+
else:
|
143
|
+
stdout.write(f"El archivo '{authentication_path}' ya existe.")
|
144
|
+
|
119
145
|
def create_views_urls(self, stdout):
|
120
146
|
home_dir = 'Home' # Nombre de la aplicación Home
|
121
147
|
views_path = os.path.join(home_dir, 'views.py')
|
@@ -160,11 +186,11 @@ def logged(request):
|
|
160
186
|
from . import views
|
161
187
|
|
162
188
|
urlpatterns = [
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
189
|
+
path("", views.home, name='home'),
|
190
|
+
path("signup", views.signup, name='signup'),
|
191
|
+
path("login", views.signing, name='login'),
|
192
|
+
path("logout", views.signout, name='logout'),
|
193
|
+
path("logged", views.logged, name='logged'),
|
168
194
|
]
|
169
195
|
'''
|
170
196
|
with open(urls_path, 'w') as urls_file:
|
@@ -195,5 +221,6 @@ urlpatterns = [
|
|
195
221
|
|
196
222
|
|
197
223
|
|
224
|
+
|
198
225
|
|
199
226
|
|
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.25 → componentsdjangotype-2.0.29}/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.25 → componentsdjangotype-2.0.29}/services/authentication/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|