componentsDjangoType 2.0.29__tar.gz → 2.0.31__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.29/componentsDjangoType.egg-info → componentsdjangotype-2.0.31}/PKG-INFO +1 -1
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31/componentsDjangoType.egg-info}/PKG-INFO +1 -1
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/services/authenticator_configurator.py +21 -18
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/setup.py +1 -1
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/LICENSE +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/MANIFEST.in +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/README.md +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/__init__.py +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/__pycache__/__init__.cpython-312.pyc +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/management/__init__.py +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/management/__pycache__/__init__.cpython-312.pyc +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/management/commands/__init__.py +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/management/commands/__pycache__/__init__.cpython-312.pyc +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/management/commands/__pycache__/createApp.cpython-312.pyc +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/management/commands/createApp.py +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/management/commands/createcomponent.py +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType.egg-info/SOURCES.txt +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType.egg-info/dependency_links.txt +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType.egg-info/requires.txt +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType.egg-info/top_level.txt +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/services/__init__.py +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/services/authentication/__init__.py +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/services/authentication/auth.py +0 -0
- {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/setup.cfg +0 -0
{componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/services/authenticator_configurator.py
RENAMED
@@ -92,13 +92,19 @@ path('', include('home.urls'))
|
|
92
92
|
# Verificar si la ruta de 'Home.urls' está en 'urlpatterns'
|
93
93
|
if "include('Home.urls')" not in urls_content:
|
94
94
|
stdout.write("Agregando ruta para 'home.urls'.\n")
|
95
|
-
|
95
|
+
|
96
|
+
# Agregar importación de 'include'
|
96
97
|
urls_content = urls_content.replace(
|
97
98
|
"from django.urls import path",
|
98
99
|
"from django.urls import path, include"
|
99
|
-
"urlpatterns = [",
|
100
|
-
"urlpatterns = [path('admin/', admin.site.urls),\n path('', include('Home.urls')),"
|
101
100
|
)
|
101
|
+
|
102
|
+
# Agregar 'Home.urls' a 'urlpatterns'
|
103
|
+
if "urlpatterns = [" in urls_content:
|
104
|
+
urls_content = urls_content.replace(
|
105
|
+
"urlpatterns = [",
|
106
|
+
"urlpatterns = [\n path('admin/', admin.site.urls),\n path('', include('Home.urls')),\n"
|
107
|
+
)
|
102
108
|
updated = True
|
103
109
|
|
104
110
|
# Escribir los cambios si se modificó algo
|
@@ -154,9 +160,8 @@ path('', include('home.urls'))
|
|
154
160
|
else:
|
155
161
|
stdout.write(f"El directorio '{home_dir}' ya existe.\n")
|
156
162
|
|
157
|
-
#
|
158
|
-
|
159
|
-
views_code = '''from django.shortcuts import render
|
163
|
+
# Sobrescribir o crear el archivo views.py
|
164
|
+
views_code = '''from django.shortcuts import render
|
160
165
|
from Home.services.authentication import Authentication
|
161
166
|
|
162
167
|
def home(request):
|
@@ -173,12 +178,10 @@ def signing(request):
|
|
173
178
|
|
174
179
|
def logged(request):
|
175
180
|
return Authentication.get_logged(request)
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
else:
|
181
|
-
stdout.write(f"El archivo '{views_path}' ya existe.\n")
|
181
|
+
'''
|
182
|
+
with open(views_path, 'w') as views_file: # Abrir en modo escritura siempre
|
183
|
+
views_file.write(views_code)
|
184
|
+
stdout.write(f"El archivo '{views_path}' ha sido creado o sobrescrito.\n")
|
182
185
|
|
183
186
|
# Verificar si urls.py existe y crearlo si no existe
|
184
187
|
if not os.path.exists(urls_path):
|
@@ -186,13 +189,13 @@ def logged(request):
|
|
186
189
|
from . import views
|
187
190
|
|
188
191
|
urlpatterns = [
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
192
|
+
path("", views.home, name='home'),
|
193
|
+
path("signup", views.signup, name='signup'),
|
194
|
+
path("login", views.signing, name='login'),
|
195
|
+
path("logout", views.signout, name='logout'),
|
196
|
+
path("logged", views.logged, name='logged'),
|
194
197
|
]
|
195
|
-
|
198
|
+
'''
|
196
199
|
with open(urls_path, 'w') as urls_file:
|
197
200
|
urls_file.write(urls_code)
|
198
201
|
stdout.write(f"El archivo '{urls_path}' ha sido creado.\n")
|
File without changes
|
File without changes
|
File without changes
|
{componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/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.29 → componentsdjangotype-2.0.31}/services/authentication/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|