componentsDjangoType 2.0.16__tar.gz → 2.0.17__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {componentsdjangotype-2.0.16/componentsDjangoType.egg-info → componentsdjangotype-2.0.17}/PKG-INFO +1 -1
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17/componentsDjangoType.egg-info}/PKG-INFO +1 -1
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/services/authenticator_configurator.py +17 -16
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/setup.py +1 -1
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/LICENSE +0 -0
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/MANIFEST.in +0 -0
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/README.md +0 -0
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/componentsDjangoType/__init__.py +0 -0
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/componentsDjangoType/management/__init__.py +0 -0
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/componentsDjangoType/management/commands/__init__.py +0 -0
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/componentsDjangoType/management/commands/createApp.py +0 -0
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/componentsDjangoType/management/commands/createcomponent.py +0 -0
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/componentsDjangoType.egg-info/SOURCES.txt +0 -0
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/componentsDjangoType.egg-info/dependency_links.txt +0 -0
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/componentsDjangoType.egg-info/requires.txt +0 -0
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/componentsDjangoType.egg-info/top_level.txt +0 -0
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/services/__init__.py +0 -0
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/services/authentication/__init__.py +0 -0
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/services/authentication/auth.py +0 -0
- {componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/setup.cfg +0 -0
{componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/services/authenticator_configurator.py
RENAMED
@@ -47,7 +47,7 @@ class DjangoProjectManager:
|
|
47
47
|
# Comprobar si la aplicación no está ya en INSTALLED_APPS
|
48
48
|
if f"'{self.app_name}'" not in installed_apps_content:
|
49
49
|
# Insertar la aplicación dentro de la lista
|
50
|
-
new_installed_apps = installed_apps_content[:-1] + f"
|
50
|
+
new_installed_apps = installed_apps_content[:-1] + f" '{self.app_name}',\n]"
|
51
51
|
|
52
52
|
# Reemplazar el bloque INSTALLED_APPS con la nueva lista
|
53
53
|
new_settings_content = settings_content[:installed_apps_start] + new_installed_apps + settings_content[installed_apps_end:]
|
@@ -73,28 +73,23 @@ class DjangoProjectManager:
|
|
73
73
|
stdout.write(f"Creando el archivo '{project_urls_path}'...")
|
74
74
|
with open(project_urls_path, 'w') as f:
|
75
75
|
f.write("""from django.contrib import admin
|
76
|
-
from django.urls import path, include
|
76
|
+
from django.urls import path, include # Asegúrate de incluir include
|
77
|
+
|
77
78
|
urlpatterns = [
|
78
|
-
|
79
|
-
|
79
|
+
path('admin/', admin.site.urls),
|
80
|
+
path('', include('home.urls'))
|
80
81
|
# Añade tus rutas aquí
|
81
|
-
]
|
82
|
+
]
|
83
|
+
""")
|
82
84
|
else:
|
83
|
-
#
|
85
|
+
# Leer el contenido actual del archivo
|
84
86
|
stdout.write(f"El archivo '{project_urls_path}' ya existe. Verificando contenido...")
|
85
|
-
|
86
87
|
with open(project_urls_path, 'r') as f:
|
87
88
|
urls_content = f.read()
|
88
89
|
|
89
90
|
updated = False
|
90
91
|
|
91
|
-
# Verificar
|
92
|
-
if 'urlpatterns = [' not in urls_content:
|
93
|
-
stdout.write(f"No se encontró 'urlpatterns'. Creando la lista de rutas desde cero.")
|
94
|
-
urls_content += "\nurlpatterns = [\n path('admin/', admin.site.urls),\n]\n"
|
95
|
-
updated = True
|
96
|
-
|
97
|
-
# Agregar 'include' si no está presente
|
92
|
+
# Verificar o agregar el import de 'include'
|
98
93
|
if 'include' not in urls_content:
|
99
94
|
stdout.write("Agregando 'include' a los imports.")
|
100
95
|
urls_content = urls_content.replace(
|
@@ -103,7 +98,13 @@ urlpatterns = [
|
|
103
98
|
)
|
104
99
|
updated = True
|
105
100
|
|
106
|
-
#
|
101
|
+
# Verificar o agregar la lista urlpatterns
|
102
|
+
if 'urlpatterns = [' not in urls_content:
|
103
|
+
stdout.write("No se encontró 'urlpatterns'. Creando la lista de rutas desde cero.")
|
104
|
+
urls_content += "\nurlpatterns = [\n path('admin/', admin.site.urls),\n]\n"
|
105
|
+
updated = True
|
106
|
+
|
107
|
+
# Verificar o agregar la ruta para 'home.urls'
|
107
108
|
if "include('home.urls')" not in urls_content:
|
108
109
|
stdout.write("Agregando ruta para 'home.urls'.")
|
109
110
|
urls_content = urls_content.replace(
|
@@ -112,7 +113,7 @@ urlpatterns = [
|
|
112
113
|
)
|
113
114
|
updated = True
|
114
115
|
|
115
|
-
# Escribir
|
116
|
+
# Escribir los cambios si se modificó algo
|
116
117
|
if updated:
|
117
118
|
with open(project_urls_path, 'w') as f:
|
118
119
|
f.write(urls_content)
|
File without changes
|
File without changes
|
File without changes
|
{componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/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
|
{componentsdjangotype-2.0.16 → componentsdjangotype-2.0.17}/services/authentication/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|