How iuriavil4/projeto-site-orcamento works
• Sending an email notification to a personal address
• Storing the entered data in an Oracle Database via a PL/SQL procedure
Main Components
• Client / Browser Interface: This is the front end. The user interacts with HTML pages styled with CSS and Bootstrap. The key page, for example, “orcamento/home.html”, is rendered as part of the client’s experience.
• Django Web Server: This is the heart of the back end. It involves several modules:
• URL Routing (projeto_orcamento/urls.py) to direct client requests.
• Views (app_orcamento/views.py) that process incoming requests and call appropriate logic.
• Forms (app_orcamento/forms.py) handling client submission.
• Models (app_orcamento/models.py) representing data structures (although persistence is offloaded to Oracle through a procedure).
• Utility modules (app_orcamento/email_utils.py) for sending emails.
• Oracle Database: Although Django typically supports several database engines, here it connects to an Oracle DB where client data is inserted via a PL/SQL stored procedure (illustrated in the README).
• PL/SQL Procedure: The add_cliente procedure acts as the interface for inserting the data into the database.
• Email Sending Mechanism: Triggered as part of the Django view’s workflow upon receiving a form submission.
Relationships & Data Flow
• The submission is handled by a Django View (in app_orcamento/views.py), which:
• Validates the input (potentially using app_orcamento/forms.py)
• Invokes the email utility to send an email notification.
• Connects to the Oracle Database and calls the PL/SQL stored procedure (add_cliente) to insert the client’s data.
• The Email Service (you might simply show “Email Utility Module” that abstracts the SMTP/Email service).
• The Oracle Database (depicting the PL/SQL procedure call).
Architectural Patterns & Design Principles
• Front-end (Templates, Static Assets for HTML/CSS/Bootstrap)
• Application logic (Views, Forms, URL Routing)
• Back-end services (Database interactions and Email utilities)
• That the integration with Oracle is done outside the typical Django ORM pattern by the explicit use of a procedure – thus, emphasize the custom flow for data persistence.
Relevant Technologies and Tools
• Back end: Python and Django as the framework for the web server.
• Database: Oracle Database with PL/SQL for data insertion.
• Front end: HTML, CSS, and Bootstrap for user interface presentation.
• Any middleware (if applicable) for handling database connections or email sending.