componentsDjangoType 2.0.10__tar.gz → 2.0.12__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.10/componentsDjangoType.egg-info → componentsdjangotype-2.0.12}/PKG-INFO +1 -3
  2. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/componentsDjangoType/management/commands/createApp.py +2 -2
  3. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12/componentsDjangoType.egg-info}/PKG-INFO +1 -3
  4. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/services/authenticator_configurator.py +24 -17
  5. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/setup.py +1 -3
  6. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/LICENSE +0 -0
  7. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/MANIFEST.in +0 -0
  8. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/README.md +0 -0
  9. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/componentsDjangoType/__init__.py +0 -0
  10. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/componentsDjangoType/management/__init__.py +0 -0
  11. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/componentsDjangoType/management/commands/__init__.py +0 -0
  12. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/componentsDjangoType/management/commands/createcomponent.py +0 -0
  13. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/componentsDjangoType.egg-info/SOURCES.txt +0 -0
  14. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/componentsDjangoType.egg-info/dependency_links.txt +0 -0
  15. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/componentsDjangoType.egg-info/requires.txt +0 -0
  16. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/componentsDjangoType.egg-info/top_level.txt +0 -0
  17. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/services/__init__.py +0 -0
  18. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/services/authentication/__init__.py +0 -0
  19. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/services/authentication/auth.py +0 -0
  20. {componentsdjangotype-2.0.10 → componentsdjangotype-2.0.12}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: componentsDjangoType
3
- Version: 2.0.10
3
+ Version: 2.0.12
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
@@ -12,8 +12,6 @@ Classifier: Intended Audience :: Developers
12
12
  Classifier: License :: OSI Approved :: MIT License
13
13
  Classifier: Operating System :: OS Independent
14
14
  Classifier: Programming Language :: Python
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.7
17
15
  Classifier: Framework :: Django :: 3.2
18
16
  Description-Content-Type: text/markdown
19
17
  License-File: LICENSE
@@ -31,10 +31,10 @@ class Command(BaseCommand):
31
31
  creation.installed_app()
32
32
 
33
33
  # Paso 3: Crear el archivo urls.py en la aplicación "Home" si no existe
34
- creation.create_urls()
34
+ creation.create_urls(self.stdout)
35
35
 
36
36
  # Paso 4: Crear la carpeta services y el archivo authentication.py en Home
37
- creation.creation_auth()
37
+ creation.creation_auth(self.stdout)
38
38
 
39
39
  home_dir = "Home"
40
40
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: componentsDjangoType
3
- Version: 2.0.10
3
+ Version: 2.0.12
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
@@ -12,8 +12,6 @@ Classifier: Intended Audience :: Developers
12
12
  Classifier: License :: OSI Approved :: MIT License
13
13
  Classifier: Operating System :: OS Independent
14
14
  Classifier: Programming Language :: Python
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.7
17
15
  Classifier: Framework :: Django :: 3.2
18
16
  Description-Content-Type: text/markdown
19
17
  License-File: LICENSE
@@ -115,29 +115,36 @@ urlpatterns = [
115
115
  else:
116
116
  stdout.write(f"No se encontró la lista 'urlpatterns' en '{urls_path}'.")
117
117
 
118
- def creation_auth(self, stdout):
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, stdout):
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, 'authentication.py')
124
124
 
125
- if not os.path.exists(authentication_path):
126
- stdout.write(f"Creando el archivo '{authentication_path}'...")
125
+ auth_source_path = os.path.abspath('authentication/auth.py')
127
126
 
128
- auth_path = os.path.join(self.app_name, 'services', 'authentication', 'auth.py')
127
+ if not os.path.exists(auth_source_path):
128
+ stdout.write(f"El archivo fuente '{auth_source_path}' no existe. Verifica la instalación del paquete.")
129
+ return
129
130
 
130
- # Leer el código del archivo de origen
131
- with open(auth_path, 'r') as file:
132
- auth_code = file.read()
131
+ if not os.path.exists(authentication_path):
132
+ stdout.write(f"Creando el archivo '{authentication_path}'...")
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
+ # Leer el contenido de 'auth.py' del paquete
135
+ try:
136
+ with open(auth_source_path, 'r') as source_file:
137
+ auth_code = source_file.read()
137
138
 
138
- stdout.write(f"El archivo '{authentication_path}' fue creado y el código fue escrito.")
139
- else:
140
- stdout.write(f"El archivo '{authentication_path}' ya existe.")
139
+ # Escribir el contenido en el nuevo archivo 'authentication.py'
140
+ with open(authentication_path, 'w') as dest_file:
141
+ dest_file.write(auth_code)
142
+
143
+ stdout.write(f"El archivo '{authentication_path}' fue creado y el código fue copiado.")
144
+ except Exception as e:
145
+ stdout.write(f"Error al copiar el archivo: {e}")
146
+ else:
147
+ stdout.write(f"El archivo '{authentication_path}' ya existe.")
141
148
 
142
149
 
143
150
 
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='componentsDjangoType',
5
- version='2.0.10',
5
+ version='2.0.12',
6
6
  packages=find_packages(),
7
7
  include_package_data=True,
8
8
  license='MIT',
@@ -19,8 +19,6 @@ setup(
19
19
  'License :: OSI Approved :: MIT License',
20
20
  'Operating System :: OS Independent',
21
21
  'Programming Language :: Python',
22
- 'Programming Language :: Python :: 3',
23
- 'Programming Language :: Python :: 3.7',
24
22
  'Framework :: Django :: 3.2',
25
23
  ],
26
24
  install_requires=[