componentsDjangoType 2.0.7__tar.gz → 2.0.9__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (20) hide show
  1. {componentsdjangotype-2.0.7/componentsDjangoType.egg-info → componentsdjangotype-2.0.9}/PKG-INFO +1 -1
  2. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/componentsDjangoType/management/commands/createApp.py +1 -1
  3. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9/componentsDjangoType.egg-info}/PKG-INFO +1 -1
  4. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/services/authenticator_configurator.py +19 -19
  5. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/setup.py +1 -1
  6. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/LICENSE +0 -0
  7. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/MANIFEST.in +0 -0
  8. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/README.md +0 -0
  9. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/componentsDjangoType/__init__.py +0 -0
  10. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/componentsDjangoType/management/__init__.py +0 -0
  11. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/componentsDjangoType/management/commands/__init__.py +0 -0
  12. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/componentsDjangoType/management/commands/createcomponent.py +0 -0
  13. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/componentsDjangoType.egg-info/SOURCES.txt +0 -0
  14. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/componentsDjangoType.egg-info/dependency_links.txt +0 -0
  15. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/componentsDjangoType.egg-info/requires.txt +0 -0
  16. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/componentsDjangoType.egg-info/top_level.txt +0 -0
  17. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/services/__init__.py +0 -0
  18. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/services/authentication/__init__.py +0 -0
  19. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/services/authentication/auth.py +0 -0
  20. {componentsdjangotype-2.0.7 → componentsdjangotype-2.0.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: componentsDjangoType
3
- Version: 2.0.7
3
+ Version: 2.0.9
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
@@ -26,7 +26,7 @@ class Command(BaseCommand):
26
26
  creation = DjangoProjectManager(app_name=app_name, project_name=project_name)
27
27
 
28
28
  # Paso 2: Crear la aplicación "Home" si no existe
29
- creation.app_name()
29
+ creation.create_app()
30
30
 
31
31
  # Agregar automáticamente 'Home' a INSTALLED_APPS
32
32
  creation.installed_app()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: componentsDjangoType
3
- Version: 2.0.7
3
+ Version: 2.0.9
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
@@ -3,7 +3,7 @@ import ast
3
3
  from django.core.management.base import BaseCommand
4
4
  from django.core.management import call_command
5
5
 
6
- class DjangoProjectManager:
6
+ class DjangoProjectManager(BaseCommand):
7
7
  def __init__(self, app_name, project_name):
8
8
  self.app_name = app_name
9
9
  self.project_name = project_name
@@ -46,7 +46,7 @@ class DjangoProjectManager:
46
46
  # Comprobar si la aplicación no está ya en INSTALLED_APPS
47
47
  if f"'{self.app_name}'" not in installed_apps_content:
48
48
  # Insertar la aplicación dentro de la lista
49
- new_installed_apps = installed_apps_content[:-1] + f",\n '{self.app_name}'\n]"
49
+ new_installed_apps = installed_apps_content[:-1] + f"\n'{self.app_name}',\n]"
50
50
 
51
51
  # Reemplazar el bloque INSTALLED_APPS con la nueva lista
52
52
  new_settings_content = settings_content[:installed_apps_start] + new_installed_apps + settings_content[installed_apps_end:]
@@ -115,29 +115,29 @@ urlpatterns = [
115
115
  else:
116
116
  self.stdout.write(f"No se encontró la lista 'urlpatterns' en '{urls_path}'.")
117
117
 
118
- def creation_auth(self):
119
- services_dir = os.path.join(self.app_name, 'services')
120
- authentication_dir = os.path.join(services_dir, 'authentication')
121
- os.makedirs(authentication_dir, exist_ok=True)
118
+ def creation_auth(self):
119
+ services_dir = os.path.join(self.app_name, 'services')
120
+ authentication_dir = os.path.join(services_dir, 'authentication')
121
+ os.makedirs(authentication_dir, exist_ok=True)
122
122
 
123
- authentication_path = os.path.join(authentication_dir, 'auth.py')
123
+ authentication_path = os.path.join(authentication_dir, 'auth.py')
124
124
 
125
- if not os.path.exists(authentication_path):
126
- self.stdout.write(f"Creando el archivo '{authentication_path}'...")
125
+ if not os.path.exists(authentication_path):
126
+ self.stdout.write(f"Creando el archivo '{authentication_path}'...")
127
127
 
128
- auth_path = os.path.join(self.app_name, 'services', 'authentication', 'auth.py')
128
+ auth_path = os.path.join(self.app_name, 'services', 'authentication', 'auth.py')
129
129
 
130
- # Leer el código del archivo de origen
131
- with open(auth_path, 'r') as file:
132
- auth_code = file.read()
130
+ # Leer el código del archivo de origen
131
+ with open(auth_path, 'r') as file:
132
+ auth_code = file.read()
133
133
 
134
- # Escribir el código en el archivo de destino
135
- with open(authentication_path, 'w') as file:
136
- file.write(auth_code)
134
+ # Escribir el código en el archivo de destino
135
+ with open(authentication_path, 'w') as file:
136
+ file.write(auth_code)
137
137
 
138
- self.stdout.write(f"El archivo '{authentication_path}' fue creado y el código fue escrito.")
139
- else:
140
- self.stdout.write(f"El archivo '{authentication_path}' ya existe.")
138
+ self.stdout.write(f"El archivo '{authentication_path}' fue creado y el código fue escrito.")
139
+ else:
140
+ self.stdout.write(f"El archivo '{authentication_path}' ya existe.")
141
141
 
142
142
 
143
143
 
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='componentsDjangoType',
5
- version='2.0.7',
5
+ version='2.0.9',
6
6
  packages=find_packages(),
7
7
  include_package_data=True,
8
8
  license='MIT',