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.
Files changed (24) hide show
  1. {componentsdjangotype-2.0.29/componentsDjangoType.egg-info → componentsdjangotype-2.0.31}/PKG-INFO +1 -1
  2. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31/componentsDjangoType.egg-info}/PKG-INFO +1 -1
  3. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/services/authenticator_configurator.py +21 -18
  4. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/setup.py +1 -1
  5. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/LICENSE +0 -0
  6. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/MANIFEST.in +0 -0
  7. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/README.md +0 -0
  8. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/__init__.py +0 -0
  9. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/__pycache__/__init__.cpython-312.pyc +0 -0
  10. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/management/__init__.py +0 -0
  11. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/management/__pycache__/__init__.cpython-312.pyc +0 -0
  12. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/management/commands/__init__.py +0 -0
  13. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/management/commands/__pycache__/__init__.cpython-312.pyc +0 -0
  14. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/management/commands/__pycache__/createApp.cpython-312.pyc +0 -0
  15. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/management/commands/createApp.py +0 -0
  16. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType/management/commands/createcomponent.py +0 -0
  17. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType.egg-info/SOURCES.txt +0 -0
  18. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType.egg-info/dependency_links.txt +0 -0
  19. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType.egg-info/requires.txt +0 -0
  20. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/componentsDjangoType.egg-info/top_level.txt +0 -0
  21. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/services/__init__.py +0 -0
  22. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/services/authentication/__init__.py +0 -0
  23. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/services/authentication/auth.py +0 -0
  24. {componentsdjangotype-2.0.29 → componentsdjangotype-2.0.31}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: componentsDjangoType
3
- Version: 2.0.29
3
+ Version: 2.0.31
4
4
  Summary: Comandos para crear archivos html, css y js
5
5
  Home-page: https://github.com/jose-CR/componentsDjangoType
6
6
  Author: Alejandro
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: componentsDjangoType
3
- Version: 2.0.29
3
+ Version: 2.0.31
4
4
  Summary: Comandos para crear archivos html, css y js
5
5
  Home-page: https://github.com/jose-CR/componentsDjangoType
6
6
  Author: Alejandro
@@ -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
- # Asegúrate de agregar la ruta en el lugar adecuado dentro de 'urlpatterns'
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
- # Verificar si views.py existe y crearlo si no existe
158
- if not os.path.exists(views_path):
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
- with open(views_path, 'w') as views_file:
178
- views_file.write(views_code)
179
- stdout.write(f"El archivo '{views_path}' ha sido creado.\n")
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
- 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'),
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")
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='componentsDjangoType',
5
- version='2.0.29',
5
+ version='2.0.31',
6
6
  packages=find_packages(),
7
7
  include_package_data=True,
8
8
  license='MIT',