Informe Salud y Seguridad Ambiental
import logging
from gunicorn.app.base import BaseApplication
from app_init import create_initialized_flask_app
# Flask app creation should be done by create_initialized_flask_app to avoid circular dependency problems.
app = create_initialized_flask_app()
# Setup logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
class StandaloneApplication(BaseApplication):
def __init__(self, app, options=None):
self.application = app
self.options = options or {}
super().__init__()
def load_config(self):
# Apply configuration to Gunicorn
for key, value in self.options.items():
if key in self.cfg.settings and value is not None:
self.cfg.set(key.lower(), value)
def load(self):
Created: | Last Updated:
Here's a step-by-step guide for using the Informe Salud y Seguridad Ambiental template:
Introduction
The Informe Salud y Seguridad Ambiental template provides a web application for reporting health, safety, and environmental incidents. It includes a form for entering incident details and a page to view reported incidents.
Getting Started
- Click "Start with this Template" to begin using the Informe Salud y Seguridad Ambiental template in the Lazy Builder interface.
Test the Application
-
Press the "Test" button in the Lazy Builder interface to deploy and launch the application.
-
Once the deployment is complete, Lazy will provide you with a server link to access the web application.
Using the Application
-
Open the provided server link in your web browser to access the Informe Salud y Seguridad Ambiental application.
-
On the home page, you'll see a list of reported incidents (if any) and a button to report a new incident.
-
To report a new incident:
- Click the "Reportar Incidente" button
- Fill out the form with the incident date, time, and description
-
Click "Enviar Reporte" to submit the incident report
-
After submitting a report, you'll be redirected to the home page where you can see the newly reported incident in the list.
-
The application is now ready for use. You can continue to report incidents and view the list of reported incidents on the home page.
This template provides a simple and effective way to track and manage health, safety, and environmental incidents within your organization. The application is fully deployed and managed by Lazy, so you don't need to worry about server setup or maintenance.