From b9fe64a17895aba4789efc848e1ab858c0dee985 Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Wed, 4 Sep 2024 11:36:32 +0200 Subject: [PATCH] Primera prueba para integrar mas de una app en un proyecto --- ReyMotaAppsDj/reymota/manage.py | 2 +- ReyMotaAppsDj/reymota/reymota/asgi.py | 4 ++-- ReyMotaAppsDj/reymota/reymota/settings.py | 12 +++++------- ReyMotaAppsDj/reymota/reymota/urls.py | 2 +- ReyMotaAppsDj/reymota/reymota/wsgi.py | 4 ++-- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/ReyMotaAppsDj/reymota/manage.py b/ReyMotaAppsDj/reymota/manage.py index 7fc3cf5..17d8fe1 100755 --- a/ReyMotaAppsDj/reymota/manage.py +++ b/ReyMotaAppsDj/reymota/manage.py @@ -6,7 +6,7 @@ import sys def main(): """Run administrative tasks.""" - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'finanzas.settings') + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'reymota.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: diff --git a/ReyMotaAppsDj/reymota/reymota/asgi.py b/ReyMotaAppsDj/reymota/reymota/asgi.py index 6647f88..735400e 100644 --- a/ReyMotaAppsDj/reymota/reymota/asgi.py +++ b/ReyMotaAppsDj/reymota/reymota/asgi.py @@ -1,5 +1,5 @@ """ -ASGI config for finanzas project. +ASGI config for reymota project. It exposes the ASGI callable as a module-level variable named ``application``. @@ -11,6 +11,6 @@ import os from django.core.asgi import get_asgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'finanzas.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'reymota.settings') application = get_asgi_application() diff --git a/ReyMotaAppsDj/reymota/reymota/settings.py b/ReyMotaAppsDj/reymota/reymota/settings.py index a870568..bd57e97 100644 --- a/ReyMotaAppsDj/reymota/reymota/settings.py +++ b/ReyMotaAppsDj/reymota/reymota/settings.py @@ -1,5 +1,5 @@ """ -Django settings for finanzas project. +Django settings for reymota project. Generated by 'django-admin startproject' using Django 5.1. @@ -54,7 +54,7 @@ MIDDLEWARE = [ 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] -ROOT_URLCONF = 'finanzas.urls' +ROOT_URLCONF = 'reymota.urls' TEMPLATES = [ { @@ -69,15 +69,13 @@ TEMPLATES = [ 'django.contrib.messages.context_processors.messages', ], 'libraries': { - 'filtros_de_entorno': 'finanzas.templatetags.filtros_de_entorno', + 'filtros_de_entorno': 'reymota.templatetags.filtros_de_entorno', } }, }, ] -print("Directorio de templates: ", TEMPLATES[0]['DIRS']) - -WSGI_APPLICATION = 'finanzas.wsgi.application' +WSGI_APPLICATION = 'reymota.wsgi.application' # Database @@ -128,7 +126,7 @@ THOUSAND_SEPARATOR = '.' # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/5.1/howto/static-files/ -STATIC_URL = 'static/' +STATIC_URL = '/static/' STATIC_ROOT = BASE_DIR / "staticfiles" # Default primary key field type diff --git a/ReyMotaAppsDj/reymota/reymota/urls.py b/ReyMotaAppsDj/reymota/reymota/urls.py index d0217f3..7349ffe 100644 --- a/ReyMotaAppsDj/reymota/reymota/urls.py +++ b/ReyMotaAppsDj/reymota/reymota/urls.py @@ -1,5 +1,5 @@ """ -URL configuration for finanzas project. +URL configuration for reymota project. The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/5.1/topics/http/urls/ diff --git a/ReyMotaAppsDj/reymota/reymota/wsgi.py b/ReyMotaAppsDj/reymota/reymota/wsgi.py index f64f301..55424ea 100644 --- a/ReyMotaAppsDj/reymota/reymota/wsgi.py +++ b/ReyMotaAppsDj/reymota/reymota/wsgi.py @@ -1,5 +1,5 @@ """ -WSGI config for finanzas project. +WSGI config for reymota project. It exposes the WSGI callable as a module-level variable named ``application``. @@ -11,6 +11,6 @@ import os from django.core.wsgi import get_wsgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'finanzas.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'reymota.settings') application = get_wsgi_application()