The DA-ETSISI Feedback Platform is a web application designed to collect and manage feedback from students at ETSISI. The platform allows users to submit their opinions and suggestions to improve academic and extracurricular aspects of the school.
Built with Django, the application provides a secure and user-friendly interface to ensure seamless interaction. It is also containerized with Docker, making deployment and database management efficient.
To ensure proper functionality, the following modifications are required in settings.py:
Find the relevant variable in settings.py that includes _c in its name and rename it by removing _c.
A specific key (provided separately) must be added to settings.py to enable the application to function correctly.
The provided Dockerfile ensures compatibility with MariaDB. To configure the database correctly, update settings.py with the appropriate DATABASES settings.
Modify the DATABASES section in settings.py as follows:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.mysql",
"HOST": "database",
"PORT": port,
"PASSWORD": "contraseña",
"USER": "user",
"NAME": "name",
}
}- ENGINE: Uses the MySQL backend (
django.db.backends.mysql), which is compatible with MariaDB. - HOST: The service name of the database container (e.g.,
"database"). - PORT: The port number for the MariaDB server.
- PASSWORD: The password for the database user.
- USER: The database username.
- NAME: The name of the database.
-
If using an external MariaDB instance, replace
"database"inHOSTwith the actual server address. -
Ensure that MariaDB is running before starting the Django application.
-
You may need to install MySQL client dependencies:
pip install mysqlclient
Once the necessary modifications are made, build and run the application using:
docker-compose up --buildThis command will:
- Build the Django application and its dependencies.
- Set up a MariaDB database container.
- Launch both services, allowing the application to interact with the database.
If running without Docker, ensure MariaDB is installed and configured, then start the Django development server:
python manage.py runserver- Check your
.envfile: Ensure database credentials are correctly set. - Apply migrations:
python manage.py migrate- Create a superuser (optional):
python manage.py createsuperuser- Access the application at http://localhost:8000.
- Restart the application after modifying
settings.py.
For debugging, check logs using:
docker-compose logs -f