componentsDjangoType 2.0.1__tar.gz → 2.0.2__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.1/componentsDjangoType.egg-info → componentsdjangotype-2.0.2}/PKG-INFO +1 -1
- {componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2}/componentsDjangoType/management/commands/createApp.py +19 -0
- {componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2/componentsDjangoType.egg-info}/PKG-INFO +1 -1
- {componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2}/setup.py +1 -1
- {componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2}/LICENSE +0 -0
- {componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2}/MANIFEST.in +0 -0
- {componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2}/README.md +0 -0
- {componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2}/componentsDjangoType/__init__.py +0 -0
- {componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2}/componentsDjangoType/management/__init__.py +0 -0
- {componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2}/componentsDjangoType/management/commands/__init__.py +0 -0
- {componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2}/componentsDjangoType/management/commands/createcomponent.py +0 -0
- {componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2}/componentsDjangoType.egg-info/SOURCES.txt +0 -0
- {componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2}/componentsDjangoType.egg-info/dependency_links.txt +0 -0
- {componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2}/componentsDjangoType.egg-info/requires.txt +0 -0
- {componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2}/componentsDjangoType.egg-info/top_level.txt +0 -0
- {componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2}/setup.cfg +0 -0
@@ -28,9 +28,28 @@ class Command(BaseCommand):
|
|
28
28
|
if not os.path.exists(app_name):
|
29
29
|
self.stdout.write(f"Creando la aplicación '{app_name}'...")
|
30
30
|
call_command('startapp', app_name)
|
31
|
+
if os.path.exists(app_name):
|
32
|
+
self.stdout.write(f"La aplicación '{
|
33
|
+
app_name}' fue creada exitosamente.")
|
34
|
+
else:
|
35
|
+
self.stdout.write(
|
36
|
+
f"Error: No se pudo crear la aplicación '{app_name}'.")
|
31
37
|
else:
|
32
38
|
self.stdout.write(f"La aplicación '{app_name}' ya existe.")
|
33
39
|
|
40
|
+
# Agregar automáticamente 'Home' a INSTALLED_APPS
|
41
|
+
settings_path = os.path.join(project_name, 'settings.py')
|
42
|
+
|
43
|
+
with open(settings_path, 'r') as file:
|
44
|
+
settings_content = file.read()
|
45
|
+
|
46
|
+
if f"'{app_name}'" not in settings_content:
|
47
|
+
with open(settings_path, 'a') as file:
|
48
|
+
file.write(f"\nINSTALLED_APPS.append('{app_name}')\n")
|
49
|
+
self.stdout.write(f"'{app_name}' fue agregado a INSTALLED_APPS.")
|
50
|
+
else:
|
51
|
+
self.stdout.write(f"'{app_name}' ya está en INSTALLED_APPS.")
|
52
|
+
|
34
53
|
# Paso 3: Crear el archivo urls.py en la aplicación "Home" si no existe
|
35
54
|
urls_path = os.path.join(app_name, 'urls.py')
|
36
55
|
if not os.path.exists(urls_path):
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2}/componentsDjangoType.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{componentsdjangotype-2.0.1 → componentsdjangotype-2.0.2}/componentsDjangoType.egg-info/requires.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|