This Django project is a web-based application that allows users to upload CSV and Excel files, processes these files to generate summary statistics, and emails the summary to specified recipients.
- File Upload: Users can upload CSV or Excel files through a web interface.
- FilePond Integration: The project uses FilePond for a sleek file upload experience.
- Summary Generation: After uploading, the application processes the file and generates summary statistics using Pandas.
- Email Notification: The summary statistics are sent to specified email addresses.
- Responsive Design: The interface is styled with Bootstrap for responsive and modern UI.
You can view a live preview of the application here.
- Python 3.x
- Django 3.x or later
- Pandas
- FilePond
- SweetAlert2
- Bootstrap 4.5
-
Clone the repository:
git clone https://github.com/V1CKY-DEV/devtest-upload.git cd devtest-upload -
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Set up environment variables: Create a
.envfile in the root directory and add the following:recipient1@example.com recipient2@example.com -
Run migrations:
python manage.py migrate
-
Start the development server:
python manage.py runserver
-
Upload a File:
- Navigate to
http://127.0.0.1:8000/in your browser. - Use the file input to select and upload a CSV or Excel file.
- Navigate to
-
View Summary:
- After uploading, a summary of the file's content will be displayed on the page.
- The summary is also emailed to the specified recipients.
-
Handle Errors:
- If there is an error during file upload or processing, an error message will be displayed using SweetAlert2.
devapp/views.py: Contains the logic for handling file uploads, generating summaries, and sending emails.devapp/templates/devapp/home.html: The main template extending frombase.htmlwhere the file upload form is rendered.static/css/style.css: Custom styles for the project.uploads/: Directory where uploaded files are temporarily stored.
This project is licensed under the MIT License. See the LICENSE file for details.
For any inquiries or issues, please contact Burhan Farooq Dar at vickymasoodi12@gmail.com.